Merick12 wrote:
How do I make a portal work only if some one walks at it umm... lets say north?

turf/Portal
Enter(mob/M)
if(M.client) // Makes sure that M is a player.
if(M.dir == NORTH) // If M's direction is facing north.
M.loc = locate(1,1,1) // Moves the M to that new location.
..() // Continue with whatever.


You can't do this with a obj though, so you are going to either have to use turfs for portals, or go with a different direction.
In response to Merick12
Format:
missile(Type, Start, End)

Args:
Type: An object prototype or icon file.
Start: The starting location.
End: The ending location.

Send a missile of the given Type between two locations. The effect is purely visual. When Type is an object, its icon is used for the missile.
Example:
missile(/obj/fireball, usr, loc)

--

That's the entry from the DM Reference. The way I'd do it, is I'd have an object and icon that represented my spell, and then a verb for the player to cast the spell. When the player casted the spell, I'd determine if it cast successfully or not, if so, display the missile using the missleproc, and then do damage.

The missile proc, as it says above, is purely vissible, there's no need to determine if the missile proc itself hits anything.
In response to Merick12
Merick12 wrote:
Ok I looked and I dont understand

It gives you an example right in the help file:

missile(/obj/fireball, usr, loc)


If you want to make like a fireball attack, for missle to work, you are going to need to make a fireball object first.

obj/Magic/Fireball


After that, you are going to want to make some sort of verb or something that you are going to use, to allow the player to fire off the fireball.

mob/verb/Fireball(mob/M in oview(6)) // Ok this will make a verb, which you can call on a mob in oview(6) of the player
var/magic = new/obj/Magic/Fireball //This makes a new Fireball object and assigns it to the var magic
missile(magic, src,M) //This calls the missle() proc, and will "throw" the Fireball from the player to the Mob


I should add missle() is a pretty bad way to do spells.

In response to Trinkit
What if I what the spell to be cast on any obj or mob that a player clicks on
In response to Revenant Jesus
What would you say is the best for magic spells?
Page: 1 2