spawning issues

Hello,

I'm having a little trouble with Kit's ABC Adventure's villians... Kit has some kind of sleeping power, so when he kills a NPC I have it spawn an animation that waits approx. five seconds and then spawns another NPC in it's place.

The problem: When the NPC spawns the animation I think it is spawning it somewhere else on the map instead of where the NPC was - then the NPC is spawned directly over Kit causing him not to be able to move... I know that this could be a settings problem that i did, but I can't find what the right location variable is. Anyone know?

As usual thanks in advance!

------------------
Here's my site! There is art, music, movies, and games are on there way!
(url="http://"http://www.sinthesisent.com")http://www.sinthesisent.com(/url)

Quote

Originally posted by Klatu:
The problem: When the NPC spawns the animation I think it is spawning it somewhere else on the map instead of where the NPC was - then the NPC is spawned directly over Kit causing him not to be able to move... I know that this could be a settings problem that i did, but I can't find what the right location variable is. Anyone know?

Klatu,

How are you placing the new NPC? With &&ActualX;/Y?

If so then this is your problem. Try this instead:

  • Create 2 globals: &&NewNPCX; and &&NewNPCY;

  • In the NPC death event set &&gb;_NewNPCX/Y to be equal to &&ActualX;/Y

  • Run your timer animation

  • Add the new npc at the coordinates (&&gb;_NewNPCX, &&gb;_NewNPCY)

What is happening I believe is you are killing the NPC which creates the animation, and when the animation finishes it creates the NPC at the coords &&ActualX;/Y. HOWEVER, ActualX/Y are only set when an NPC's death event or reaches target event is executed. At all other times these values contain the player's coordinates. So by the time the animation finishes the player's coordinates have been placed into those globals.

So try saving the coordinates of the NPC at its death and then launching the animation. Should work then.

Good luck.

------------------
(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)

Stark - you are the freaking man (or woman)!!!

I was hoping that it could be a little less painful than that, but alas it's not... I guess I'll have to start writing things down so that they don't get too messy...

THANKS!!!

------------------
Here's my site! There is art, music, movies, and games are on there way!
(url="http://"http://www.sinthesisent.com")http://www.sinthesisent.com(/url)

Quote

Originally posted by Klatu:
Stark - you are the freaking man (or woman)!!!.....

He is definitely male, and thinks everyone else who posts here is too. If your screen name is Maria, he'll address you as Mr. Maria (out of courtesy, of course) until someone says otherwise. But I personally think that's his only flaw. πŸ™‚

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://mywebpage.netscape.com/rduckfwj/pog/mapnotes.html")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. You'll want to explore those hidden areas now made accessible with Spells Expander.

Quote

Originally posted by Klatu:
I was hoping that it could be a little less painful than that, but alas it's not... I guess I'll have to start writing things down so that they don't get too messy...

It is a bit redundant, in my opinion, but not that bad. There are a few other workarounds that I find immensely more bothersome. But yes, writing a collective cheat sheet is definitely a good idea. Straytoaster is running the CGE Tips page and he may still be periodically trolling the forums and pulling tips out to place on his page. Regardless it is a great reference.

Quote

Originally posted by Rubber Ducky: **
He is definitely male, and thinks everyone else who posts here is too. If your screen name is Maria, he'll address you as Mr. Maria (out of courtesy, of course) until someone says otherwise.**

Hey now! I once edited a greeting to change the gender of a poster before it was pointed out to me that the person in question was female. So there! heh.

Quote

But I personally think that's his only flaw.

Give it some time. You'll find plenty more. πŸ˜‰

------------------
(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)

OK, Stark - here's another one for you...

The animation is spawning who knows where, but the npc is being reborn in the right place. Does this means that the globals settings 9npc position is right, but that the animation is not picking it up? And if so, how do i fix it?

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? What am I doing wrong???

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 πŸ™‚ )!

------------------
Here's my site! There is art, music, movies, and games are on there way!
(url="http://"http://www.sinthesisent.com")http://www.sinthesisent.com(/url)

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)

Thanks again... but there isn't any little just do it button... just kidding - I don't mind it as long as someone out there enjoys it! πŸ™‚

------------------
Here's my site! There is art, music, movies, and games are on there way!
(url="http://"http://www.sinthesisent.com")http://www.sinthesisent.com(/url)

Quote

Originally posted by Klatu:
but there isn't any little just do it button...

This would be sooooo nice... πŸ™‚

Quote

I don't mind it as long as someone out there enjoys it!

From looking at the responses you have received in your thread announcing this project, I'd say there are quite a few that enjoys your creation!

Good job!

------------------
(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)

(quote)Originally posted by Rubber Ducky:
**But I personally think that's his only flaw.;)
No offense to Stark, of course. πŸ™‚

------------------
"When angry, count ten. When very angry, swear!" Β—Mark Twain
(url="http://"http://www.evula.org/wolvenstudios/projects/tfm.html")The Four Mages(/url), an unfinished quest-oriented plug-in for Pillars of Garendall. | (url="http://"http://www.evula.org/wolvenstudios/projects/tfm_faq.html")TFM FAQ(/url) | (url="http://"http://www.evula.org/wolvenstudios/projects/tfm_log.html")TFM Progress Log(/url)
Β— Cafalll, the only permanent employee of (url="http://"http://www.evula.org/wolvenstudios/")Wolven Studios(/url).
**