Logically, if you delete the NPC you no longer have an actualX, actualY to place the new NPC. It follows that you have to get the replacement NPC on the map before the original disappears. This should happen in the blink of an eye so it probably would not be noticed as a double image. There is still the problem that two NPCs cannot occupy the same tile at the same time. I know a way around that but it's leading me strongly back to my original thought that the only way this works is if each retreating soldier is a unique NPC. I'm going to sleep on this (I've just had an exhausting day with the grandkids) and get back to you tomorrow.
-
With a clearer head today, I've come to the realization that the only way to utilize actualX, actualY for an NPC is through a death event since in any other instance there is no way to target a specific NPC's actualX, actualY. So we have to kill him rather than delete him in an NPC Control action. Since you were able to get the retreating replacement NPC working, all that is left is to place a new NPC one tile south of where the original was so he doesn't jump back to the original tile.
Create a global "gb_pseudoY." In the death event for the retreating NPC, do something like this:
Change globals -> "set gb_pseudoY = &&actualY"
Change globals -> "add to gb_pseudoY +1"
NPC control -> add Soldier at &&actualX, &&pseudoYThe last frame of the retreating NPC's animation would be linked to a "kill self" action.
-
Pixor, on Jul 31 2005, 09:07 PM, said:
Ok.. I lied, It still didn't work.. I used NPC Contol, and told it to delete all of that certain type of NPC, but then I still can't tell it where to add them back.. Maybe it's just impossible....
View PostRubber Ducky, on Aug 1 2005, 12:06 PM, said:
Since you were able to get the retreating replacement NPC working, all that is left is to place a new NPC one tile south of where the original was so he doesn't jump back to the original tile.
View PostI misspoke, I couldn't even get the Retreating NPC to come on the screen. So couldn't I do the same thing bringing in the retreating NPC that we did getting rid of it?
One more question, Where did ActualY come in? Is that another global? And if so, what is it
P.S. I won't be able to test any of this.. I have a looooong week of High School marching band camp. Thats why I couldn't check this til now...
EDIT: The One more question thing
This post has been edited by Pixor : 01 August 2005 - 08:22 PM
-
Pixor, on Aug 1 2005, 09:21 PM, said:
Where did ActualY come in? Is that another global? And if so, what is it
View PostActualX, ActualY is where a creature drops his gold and goodies when he dies. In NPC Control, you would choose custom coordinates and find them near the bottom of the list (under PlayerX, PlayerY.) As far as I can determine, the only time you can use these coordinates is in a Death Event because there is no other way to select which creature you want these to affect.
So, in brief, here's how I think it works:
Big Event has an NPC Control -> Kill all soldiers. (N.B. NOT "delete")
Soldiers have a Death Event -> NPC Control -> add Retreater at ActualX, ActualY.
Retreater has zero movement but an animation walking south. The last frame of the animation is linked to Flag 5 - Kill self.
Retreater's Death Event has ->
{Change globals -> "set gb_pseudoY = &&actualY"
Change globals -> "add to gb_pseudoY +1"
NPC control -> add Soldier at &&actualX, &&pseudoY}The only question left in my mind is whether or not you need to make all your soldiers unique. I expect you do not need to do so. This is based on evidence that when you use a spell to kill all the creatures surrounding you at once, the gold drops where each one was standing. This indicates that ActualX, ActualY is working independantly for each creature.
P.S. Have a great time at your Marching Band Camp. This brings back fond memories of many years in marching bands. I still play my instrument (French horn) but don't march with it now.
-
You might try really concentrating on the animation window.
You have, as default (0), the NPC walking the eight directions.
Coldstone automatically switches to attack (1) if there is a set of attack animations, when the NPC engages in combat. The attack animation is also in eight directions. Keep that.
But at the end of each direction in the attack animation mode, you're supposed to flag the NPC to return to the default animation to walk around again (set animation I think).
Try having a third set of animations where there's just the south set of the NPC walking. Make this a standard instead of eight directions. Use the boleen (?) capability so that the NPC will actually walk south. Make sure that the collision will follow. Instead of flagging to the default walking animation, at the end of each direction, flag to the third set of animations where the NPC walks south. At the end of the south animation set, flag back to default. Don't loop this.
Make three or four NPCs. For the default animations in each, add a different number of white boxes or an animation in each direction. Just don't start your looping flags until you begin your real animation. What this does is delay the NPC movement. So you'll have three or four different NPCs looking the same but moving south at different times. The white boxes will look like the NPC disappears, so keep that in mind. So you might want some kind of walking animation instead. Just make sure that the looping flag is where you want and not at the beginning of each direction.
If you want to try it, instead of making three or four NPCs with white or extra animations at the beginning of each default (walking), use just one NPC. Make several other sets of walking south animations. Each set of walking south animation carries the NPC a different distance south. So instead of instructing Coldstone to switch to the south animation, instruct it to switch to random animations. Just make sure that at the end of each south animation, you switch animation back to default.
Keep in mind that when attacking, Coldstone will automatically switch to attack (1) from default.
I haven't tried to switch an NPC from an 8 direction to a standard direction, so I have no idea if this will work or not.
(Boy, I'm gone for a little while, and the board explodes!!)
-
Debra, the point is he wants them all to move one tile south at a given signal and then resume their normal movement.
Pixor, on Jul 30 2005, 11:17 AM, said:
You see I wanted them to be able to move around normally and then when I hit a button they all move down a tile...
View PostSwitching animations won't do it unless there is an external way to trigger the switch.
-
Too bad.
-
Hey RD, It didn't work... First of all.. I'm sorry it took me so long to get back to u. I've been busy. Ok. We had decided to:
Rubber Ducky, on Aug 2 2005, 06:41 AM, said:
Big Event has an NPC Control -> Kill all soldiers. (N.B. NOT "delete")
Soldiers have a Death Event -> NPC Control -> add Retreater at ActualX, ActualY.
Retreater has zero movement but an animation walking south. The last frame of the animation is linked to Flag 5 - Kill self.
Retreater's Death Event has ->
{Change globals -> "set gb_pseudoY = &&actualY"
Change globals -> "add to gb_pseudoY +1"
NPC control -> add Soldier at &&actualX, &&pseudoY}The only question left in my mind is whether or not you need to make all your soldiers unique. I expect you do not need to do so.View Post
But it didn't work out... I did all of that exactly. I had a couple of the soldiers on the screen when I tried it and nothing worked. When I hit the button to call the event, the soldiers just faded away as if they had died. But no gold came out. Then nothing happened. So I lowered it to 1 soldier. The same thing happened. But when I tried attacking and killing them that way, they died normally and still put out gold. So I was thinking. Even if we get it to work with the death event. What happens when u kill them by attacking? will they turn into southgoing NPCs?
This is difficult.. But I think we will eventually find an answer...
-
Ok.. I tried something to test what was going wrong. I deleted the soldier from the map, and added into the map a Retreater. That way we could see if that was the problem. So right when I started it up, the Retreater moved south then disapeared. So I think that means that u cannot have an &&ActualX or &&ActualY tag in a death event. It does the event after it kills it, so there is no longer an actualX or ActualY to work with.....
-
I'm going to work on this. I'm still thinking there is a way to make it work, but I'm going to do some experiments. I'll post back if I can solve this.
-
MUAH HAHAHA MUAH HAHAHAHAHA MUAH HA HA HA HA HA HA HA HAAAAAAAAA
clears throat Anyway... I made a breakthrough! I'm not there yet but I'm closer... Here's what I did:
Main Event: NPC Control:
Add Retreater &&ActualX, &&ActualY
Delete Soldier -Then the Retreater, instead of having white spaces, has ลผinterpolation? I think thats what it is.... It has each picture moving down few frames.
Then Frame 6 has a flag number 4, call sprite. It calls the soldier. (the normal one). Then Frame 7 has a kill myself.
But there are 2 problems....
When I tested it, it kinda worked. Since I said &&ActualX, &&ActualY in an event... I think it went to the players actual x and y. So when it deletes the soldier and adds the retreater, it adds it where the player is. Then it moves down, and creates a soldier again. The soldier is where it should be, but it just sits there.... I think it is because it is a sprite.. Is a sprite a character? If so, why didn't it work....
-
Pixor, on Aug 16 2005, 03:35 PM, said:
The soldier is where it should be, but it just sits there.... I think it is because it is a sprite.. Is a sprite a character? If so, why didn't it work....
View PostMy topic is dead... lol But seriously, If you were to say "add sprite" in an anim, you can't make it an NPC can u? It wasn't moving and I was thinking that might be the reason..... please correct me if I'm wrong.
-
You can add an NPC by creating an event that adds it. Then in the animation, call the event -- #6 I think.