Quote
Originally posted by Klatu:
The animation is spawning who knows where, but the npc is being reborn in the right place. Does this means that the globals settings npc position is right, but that the animation is not picking it up? And if so, how do i fix it?
Are you using pixel coordinates for the animation?
Animations are placed with the Stamp Control event object, and this uses pixel coordinates to place the animation, not movement coodinates.
Ie, if you want to place a stamp on the coordinates (32,10) you need to do a bit of math to figure out what the exact pixel coordinates of that tile are. The math formula is: (X32) - 32, (Y32) - 32 (or you can simplify this to: (X-1) * 32, (Y-1) * 32 ).
Thus in the above example you would be placing your stamp at the coordinates (992,288). This should allow you to see your stamp and you can then "tweak" it as you see fit.
If you are trying to get the animation to fire off in a randomly defined location(ie, where your NPC is being launched) then you will need a new set of globals. Let's call them &&gb;_animX/Y. You will have in your NPC death event already the code that will define your other globals to locate where the NPC died. Therefore in your animation event do the following:
- Save the value of the NPC coordinates(&&gb;_NewNPCX/Y) into your new globals(&&gb;_animX/Y).
- Use Change Globals to subtract 1 from &&gb;_animX/Y
- Use Change Globals to multiply &&gb;_animX/Y by 32
- Use Stamp Control to place the animation at the coords (&&gb;_animX, &&gb;_animY)
Quote
Another thing besides the spawning is that I'm trying to make it so that if the player walks into a certain spot he is regenerated in health... Ive tried changing the attributes of the stamina back to 100, but this does nothing... I also tried a more complex event where the player is given a healing item and it is used by the event, but still nothing?
You do need to use the Attribute Wizard to add health to the player. Make sure you are adding health or setting health to a value.
Also, how are you getting the event onto the tile that the player needs to walk on in order to execute the event? If this is done always on a regular map then you can just assign the event to a tile within the map editor by using the events layer. Otherwise you will need to have a loading event in the locals event of your location definition that calls a map cell change event object which changes the tile coordinate to place your event onto it. If you let me know how you are calling the event I can be more specific, heh.
Quote
As usual I appreciate the help... Oh, and Stark - you will be mentioned in the credits (however short they may be - because it's only me working on this
I prefer having children named after me but, barring that, being creditted is always flattering. Thank you.
------------------
(url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url)
(url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url) | (url="http://"http://ucplugs.evula.net/pog.html")PoG Upcoming Plug-Ins Directory(/url)