ID:144891
 
Code:
Spirit Pressure
mob
verb
spiritpressure(mob/m in oview(1))
set category = "Ability"
set name="Spirit Pressure"
if(m)
if(m.froze)
usr << "They are already frozen with fear!"
return
if(usr.froze)
return
if(usr.reiatsu <= m.reiatsu)
m<<"You become frozen with fear as you feel [usr] awesome reiatsu!"
usr<<"You release your Spirit Pressure on [m]"
var/Sleeptime = round(usr.reiatsu -m.reiatsu)
if(Sleeptime <= 1)
Sleeptime = 55
move=0
m.froze = 1
sleep(Sleeptime)
if(m)
m.move=1
m.froze = 0
sleep(8)


Problem description:

Well, for some odd reason, this verb will not work. I tried using it on the hollows in my game, and they just refuse to freeze >.<


Another problem I have is my Flash Step. Unfortunately, more often than not, the players of my game get all excited about flash step (when activated, you walk like 1,2,3, or 4 steps further than you usually would) and flash outside the boundary of z1. I tried making an area like:

area
noflash
Entered(mob/M)
if(M.flash ==1)
M.flash = 0


I added the area all around the map, but it doesn't work x_x
GohanIdz wrote:
Code:
Spirit Pressure
if(usr.froze)
return
> if(usr.reiatsu <= m.reiatsu)
> m<<"You become frozen with fear as you feel [usr] awesome reiatsu!"


- Eur. You're returning, and then doing something else. Indendation off.


> Another problem I have is my Flash Step. Unfortunately, more often than not, the players of my game get all excited about flash step (when activated, you walk like 1,2,3, or 4 steps further than you usually would) and flash outside the boundary of z1. I tried making an area like:
area
> noflash
> Entered(mob/M)
> if(M.flash ==1)
> M.flash = 0
>

I added the area all around the map, but it doesn't work x_x


- Well first of all, plainly moving their coordinates is bogus. They can warp through everything, anywhere, anytime.

Secondly, that code you did there, it's wrong. Really wrong.
You're not checking wether the thing that Entered() IS a mob. And you're using a boolean variable.
Entered(mob/M) if(istype(M)) // If it IS a mob
if(M.flash) // Check below
M.flash=0


Boolean Variables
// When checking for TRUE/FALSE values

if(var==1) // Wrong
if(var) // Right

if(var==0) // Wrong
if(!var) // Right


Now, as I said, just changing their coordinates is bogus. Truely. Check if there is any densed objects infront of them, and check if they're not outside the map's boundaries.

mob/verb/move()
for(var/i=4,i>1,i--)
var/turf/t=locate() in get_step(usr,usr.dir)
if(t&&t.density)i=null // Stop the loop if they're facing something densed.
step(usr,usr.dir) // Make them move 1 tile up.
// Though, let's be certain they're not outside the map's boundaries.
if(usr.x>world.maxx)usr.x=world.maxx
if(usr.y>world.maxy)usr.y=world.maxy


In response to Mysame
Mysame wrote:

> Entered(mob/M) if(istype(M)) // If it IS a mob
> if(M.flash) // Check below
> M.flash=0





It said inconsistant indentation and I put it like this:

area
noflash
Entered(mob/M) if(istype(M))
if(M.flash)
M.flash=0
In response to GohanIdz
Always works fine for me, though. Indent it like you normally would, then.