Walk to, THEN pick up, without losing control

Started by FractalCore, Sun 15/06/2008 00:42:44

Previous topic - Next topic

FractalCore

I want my character to walk to an object, then look at it and say something, then pick it up. How do I do that without taking control away (mouse pointer shouldn't disappear), which is what eBlock does. This is what I have...

  cEgo.Walk(47, 222,  eBlock);
  player.FaceObject(object[0]);
  cEgo.Say("It's an object");
  oConcreteBlock.Visible = false;
  player.AddInventory(iConcreteBlock);

Is it possible? It's ok if he does it when picking the object up. Also, just quickly, remind me how to play the pick up animation, assuming i have 8 direction pickup loop animations to choose from.

Ishmael

I don't know of a newer workaround for it, but I did a system for this back in the days of AGS 2.6-something and it did take some time to figure out. Basically you'd just need to move the character, and somewhere non-blocking (like repeatedly_execute) check when the character is close enough and then perform the action. Developing a system to make it work universally will take some fiddling, but it's doable and not very hard in the end.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

FractalCore

Damn, ok thanks. I thought it might have been simply the use of a different command.


SMF spam blocked by CleanTalk