Post new topic    
Liquid Metal Slime
Send private message
Problem Animating NPC 
 PostFri May 30, 2014 4:22 pm
Send private message Reply with quote
I am currently trying to animate an NPC so he looks like he walks a bit, then climbs down a ladder. I want it to look like the NPC mounts the ladder when he touches it, so I am using two NPC's in my script, one of which is the "walking NPC sprite set" and the other which is the "climbing NPC sprite set."

The Problem:
The NPC properly walks to the ladder and appears to look like he mounts it (by changing to a different NPC), but for some reason he does not continue to climb down the ladder, he instead disappears!

As far as I can tell, I am using the proper "wait for NPC" function, so I don't understand why the script does not seem to wait for the NPC to make it down the length of the ladder before deleting him.

Here's a look at the script:
Code:
  #Makes Jinso Climb Down Ladder
  walk NPC (4, down, 1)
  wait for NPC (4)
  walk NPC (4, left, 2)
  wait for NPC (4)
  walk NPC (4, down, 4)
  wait for NPC (4)
  destroy NPC (4)
  create NPC (9, 11, 15, down)
  embiggen now
  wait(2)
  walk NPC (9, down, 5)
  wait for NPC (9)
  set NPC direction (9, up)
  wait
  destroy NPC (9)
  create NPC (4, 11, 20, up)
  embiggen now


Here's how I understand it should work:
-The NPC #4 walks down, then left, then down.
-At this point he has reached the top edge of the ladder.
-NPC #4 is then deleted and NPC #9 is created in it's place (NPC #9 uses a sprite set which looks like the NPC has mounted the ladder).
-NPC #9 then "climbs" down the ladder 5 tiles.
-Once down the ladder, the NPC #9 is then deleted, and NPC #4 is re-created in it's place.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Metal Slime
Send private message
 
 PostFri May 30, 2014 4:37 pm
Send private message Reply with quote
Some quick and easy possible problems to check in custom:

-make sure the wallmap is correct, so that the NPC can walk down the ladder
-make sure the NPC9 has a non-zero walking speed
-make sure there are no other copies of NPC9 anywhere on the map

If none of these are the issue, we might need to see what "embiggen now" is doing.
I am Srime
Liquid Metal Slime
Send private message
 
 PostFri May 30, 2014 4:40 pm
Send private message Reply with quote
msw188 wrote:
Some quick and easy possible problems to check in custom:

-make sure the wallmap is correct, so that the NPC can walk down the ladder
-make sure the NPC9 has a non-zero walking speed
-make sure there are no other copies of NPC9 anywhere on the map

If none of these are the issue, we might need to see what "embiggen now" is doing.


Ahh. I bet it's the second thing you mentioned, unfortunately I have work now so I can't test it, but I bet that's the problem.

Thanks, I'll report back if it's not any of these things you mentioned.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Display posts from previous: