Yet another problem
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
el_timo

Okay, i've got a spriteon auto face that when i talk to continues to walk around as if i wasn't talking to her.
Any ideas???

Posted on 2006-11-22 17:06:19

el_timo

Any ideas?????
Ne1????

Posted on 2006-11-23 16:53:41

Kildorf

Setting an entity to auto-face doesn't make it stop moving when it gets activated. One of the easiest ways to force an entity to stop moving is to do something like this...


void talk_to_guy() {
// this is called when you talk to a particular entity

// what we're doing here is storing the entity's current
// speed, then setting it to 0, effectively stopping its
// movement
int reset_speed = entity.speed[event.entity];
entity.speed[event.entity] = 0;

// talk with the guy
. . .

// now you're done talking to the guy, so clean up
// by setting the entity's speed back to normal
entity.speed[event.entity] = reset_speed;
}



This is a little kludgy and it might be nice to function it out or whatever, but it works. In fact, it's exactly what I did in Journey to Black Mountain.

Good luck.

Posted on 2006-11-23 18:05:32 (last edited on 2006-11-23 18:06:02)

el_timo

Thanks

Posted on 2006-12-03 05:06:53

Arkhan

Isnt there an entity pause function that pauses the entity til you unpause them?

Posted on 2007-01-15 00:00:36

Gayo

Quote:Originally posted by Arkhan

Isnt there an entity pause function that pauses the entity til you unpause them?

I'm not aware of one. What we do in Sully is keep a global array handy. When we want to turn off the entities we save their speeds to the global array and set them all to speed 0. Then when we want to reactivate them we reload their speeds from the array. You'd do it the same way to pause a single entity, just on a smaller scale.

Posted on 2007-01-20 16:55:22

Interference22

There IS a function for freezing ALL entity updating (check the documentation for it's name, it currently escapes me) but that does of course mean that EVERYONE stops dead when you engage in conversation. Still, this might be desirable.

Posted on 2007-01-23 19:19:47

resident

Shouldn't catching VERGE in a loop stop all the entities from moving unless you run processentities and render?

Posted on 2007-01-24 02:48:46

Overkill

As far as I recall, I thought it was Showpage() that updates entities.

Posted on 2007-01-24 21:16:54

resident

You're probably right, I don't really remember.

Posted on 2007-01-25 14:43:11

Gayo

Yeah, ShowPage does a lot of hidden background stuff unrelated to its main function.

Posted on 2007-01-25 16:11:16


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.