Entity movement question
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Gayo

If I set an entity's movecode to "L1" (or whatever) and it starts to move left by a tile, then halfway to the next tile I set the movecode to "" (blank), does the entity stop there, or does it keep on going? It looks like it keeps on going, I just want to make sure I'm not crazy here.

Posted on 2004-05-20 09:01:12 (last edited on 2004-05-20 11:45:54)

rpgking

When you set it to "L1", won't it move a full 16 pixels to the left before it processes the next movecode?

Posted on 2004-05-20 15:27:45

RageCage

yeah I'm pretty sure it will finish moving L1 but if you want to make sure the entity is in the right place you could:

entity.x[ent]=entity.x[ent] /16 *16;

Posted on 2004-05-20 15:54:10

vecna

If you want to stop an entity RIGHT NOW for some reason, do entity.movecode[] = 0

Posted on 2004-05-20 22:30:51

resident

What IS entity.movecode? The documentation is understandabley sparse on the subject.

Posted on 2004-05-20 22:40:58

RageCage

entity.movecode is a way of telling if the entity is following a move script or not

as for setting it's value, verge gives me an HVAR error

Posted on 2004-05-20 22:55:19

Gayo

I tried setting the movecode to 0 earlier, and it always seems to crash me with a message along these lines:

Unknown HVAR (61,5) (set 0)

ProcessLevel - process.vc (62)


--where the line is in ProcessLevel of process.vc, of course. The 61 is constant in every version of this error, so I presume it refers to entity.movecode, and the number after it ("5" here) seems to be the entity index.

Posted on 2004-05-21 03:00:54 (last edited on 2004-05-21 03:04:46)

vecna

Doh.

Posted on 2004-05-21 12:54:53

Overkill

Also, in the new version, it seems that...

entity.visible[ent]=0;

...still gives a HVAR error message. Or am I mistaken?

Posted on 2004-05-22 01:20:35

vecna

I dont think entity.visible was in the last public build? :o

Posted on 2004-05-22 03:07:50

vecna

OK I lied.
entity.movecode=0 is no longer the preferred way to stop an entity rightnow, the v3 way to stop an entity is EntityStop(). Old habits die hard.

V3 entities are not exactly a simple state machine anymore, you can't just alter the flag and have everything work write, so that's not supposed to be writable (proper errors for trying to write to a read-only var will be in a future build, but not this one since it's already so late)

Posted on 2004-05-25 02:37:35


Displaying 1-11 of 11 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.