Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Spawning a character after a different one is killed

Author
Message
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 16th Jan 2007 03:19
I'm trying to save my frame rate and to create interesting game play. I need to know how I would make an enemy who is killed spawn a different enemy. For example a Character is a the top of some stairs you kill him/her and another character is spawned behind you, at the bottom of the stairs.

Thanks

u would understand if u knew my name was Luke
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 16th Jan 2007 05:40
Can someone please answer this question as I believe it is very possible and may help other forum users.

"Its not how many times you fall its how many times you get back up!"
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 16th Jan 2007 17:39
Bump

"Its not how many times you fall its how many times you get back up!"
Mickm
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Kingston, ON
Posted: 16th Jan 2007 21:56
If you know how to script then yes (I dont know how), otherwise you can always use a trigger zone to make an entity appear once you get to the top of the stairs or something.

http://www.gamestack.org
http://onlinenotes.gamestack.org
http://onlinebookmarks.gamestack.org
spex_guy
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: coming to a forum near you!!!
Posted: 16th Jan 2007 23:09
In theory, you could do this:



You could also:





Regards,
spex

Go here!
http://forum.thegamecreators.com/?m=forum_view&t=94201&b=19
Makes the sense of my location!
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 16th Jan 2007 23:54
@ Mickm
I was meaning when one enemy is killed another is spawned not triggered appearance when a spot is reached, I know how to do that.

@spex_guy
I have looked at the Respawn Properties and the, "spawn when dead", however I have not found how it is possible to make the killed entity appear in another location and thus is why I made this inquiry.

"Its not how many times you fall its how many times you get back up!"
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 17th Jan 2007 00:15
Does anyone understand what I'm asking for?

"Its not how many times you fall its how many times you get back up!"
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 17th Jan 2007 00:18
Yes, but no one knows how to do it. I've thought about it and I'm not sure it can be done.

Best.

I'm sorry, my answers are limited. You must ask the right question.

Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 17th Jan 2007 00:22
Alright glad to see I'm at least understood, I will try to script something up myself...

Thanks

"Its not how many times you fall its how many times you get back up!"
G4fan
18
Years of Service
User Offline
Joined: 21st Oct 2006
Location: in my car, driving on and on. . .
Posted: 17th Jan 2007 03:17
Try spawning a guy in a trigger zone.

My first game: "Wars of Crime"-35% completed
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 17th Jan 2007 04:24 Edited at: 17th Jan 2007 05:07
Can someone who is a scripting genius explain to me why this won't work.



"Its not how many times you fall its how many times you get back up!"
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 17th Jan 2007 15:15
settargetname=

that will just set the entities internal target value to the other entity. it wont help you spawn.


try this:

give the first enemy a name like "Jerry"
give the second enemy a name like "Tom" (and make him wait until activated to spawn, like you were spawning him from a trigger zone)

place a dynamic entity somewhere in the vacinity of the action (a crate or something), set it's strength to 0 and make it immobile.
call it "actiontrigger"

ok, here's the hard bit.


you're going to have to make the first enemy (Jerry) a key.

Change his destroy script to

:state=0,plrdistwithin=1000:plrtake=1,suspend

now, that dynamic entity you placed (actiontrigger) is going to need a "main" script something along the lines of

state=0,plrdistwithin=1000,plrhaskey=1:activateifused=1

in the actiontrigger properties, change it's "use key" field to "Jerry" and its "ifused" field to "Tom"

thats it!

When you kill the first guy, you should collect him as a "key", then because you are in the zone of the actiontrigger, and you have the key, the second guy will be activated.

you can use this in a multitude of ways, I used it in Nvidia to create C4 that you could place, and blow up a door, or to make a boss enemy spawn smaller "hench" creatures.

Phlum
18
Years of Service
User Offline
Joined: 30th Jul 2006
Location:
Posted: 17th Jan 2007 19:35 Edited at: 17th Jan 2007 19:37
There's a simple way. I don't know if it will work, but I'll test it out later today. Look at the "IsObjective" when you right-click the enemy. Set it to 1, and set the other enemy to 1. I'll try it now!

EDIT: Forget that idea...



[center]

Attachments

Login to view attachments
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 17th Jan 2007 20:17
if emptys mod makes your characters halfway though the floor, it's because they aren't scaled to 100%.

make sure their scale in the characters FPE is set to 100. (then delete the characters DBO and BIN files)

basically, with empty's mod, if you make a character >100 it will appear above the floor and <100 will make it go into the floor.... gotta be bang on 100%.

I may not have explained my method clearly enough, but I can guarantee it works. if I can be bothered I'll get a test map up in a while.

Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 17th Jan 2007 21:29 Edited at: 17th Jan 2007 22:29
I still can't seem to get it working. Could explain more when you get the time? Thank you for trying though it seems so often that no one can be bothered.

"Its not how many times you fall its how many times you get back up!"
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 18th Jan 2007 00:12 Edited at: 18th Jan 2007 01:36
Butters?

"Its not how many times you fall its how many times you get back up!"
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 19th Jan 2007 00:35
Well now that Butters has left for a while, does anyone else here
know how to do what he was talking about?

"Its not how many times you fall its how many times you get back up!"
RedneckRambo
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Worst state in USA... California
Posted: 19th Jan 2007 03:39
I think he was pretty clear on what to do.

Tiggle Bitties

Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 19th Jan 2007 03:57
I did his instructions exactly and it didn't work how bout you build a test map and try it for yourself.

"Its not how many times you fall its how many times you get back up!"
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 25th Jan 2007 16:42
I don't mean to be a pest but I really need to get this working, anyone that can tell me how to accomplish this?

"Its not how many times you fall its how many times you get back up!"
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 25th Jan 2007 22:49
I don't know what you mean. If you mean when one enemy dies, another one spawns infinitely? Or just if one enemy dies, a second one spawns, but after the second one dies, no more spawn? I'm pretty sure I can do either.

Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 26th Jan 2007 00:55
@Inspire
I asked how to allow another enemy to be spawned by the death of another.

"Its not how many times you fall its how many times you get back up!"
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 26th Jan 2007 03:18
Well how many enemies do you want to spawn after the death of another?

Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 28th Jan 2007 02:49
Well Inspire that shouldn't matter, the question was not how to make an enemy die then spawn again, rather one enemy to die; then for a different one to spawn. I am aware of how to change the settings on the character spawn if that was what you meant.

Thank you for your time and effort!

"Its not how many times you fall its how many times you get back up!"
Veron
18
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 29th Jan 2007 05:17
Butters gave you the answer, stop continuously pestering everyone here for the script!
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 29th Jan 2007 06:04
@ Vernon I don't mean to be, but have you tried it and gotten it to work? I have, and I have tried it numerous times without success.

"Its not how many times you fall its how many times you get back up!"
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 11th Mar 2007 03:38
Sorry, butters, I mapped it out, tested it and done exactly like you suggested. It really did make sense. Problem was the player did not pick up the character by using plrtake. Perhaps, they made changes where a character cannot be taken by the player? Anyway, the corpse just became suspended prone on the ground. I did have fun pushing him off of the "ground" pad off into the 3D world and watch him float away until I couldn't see him anymore.

I tried several variations and just couldn't get it to work.


BTW, I have used a lot of your scripts. You are very knowledgable through your experience. Thanks for the contributions and trying to help. I was interested in this as well.

As opposed to Highlander.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 11th Mar 2007 10:50 Edited at: 11th Mar 2007 10:54
I came up with a solution that is simple but has a slight down-side which is not a real problem -- at least for me.

Butters got me to thinking about keys and especially the "ifused" property which is not found in a characters property list. Without going into a lot of explanation here is what I did and this is the down-side.

I hard-coded into the .fpe of the character I tested this line:

ifused = test

I then made sure that the bin and dbo files were deleted just in case it made a difference.

I then added in an already existing destroy fpi, activateifused=1, just before the "destroy" action. See code.




I then placed the character with the changed fpe on the map and made sure that the "fadecorpse" fpi was in the destroy property. Then I put another character on the map, renamed it test and set spawn at start to "NO". Set Max at anytime, Maximum spawn, and Number to spawn all to 1.

When you kill the entity that had the fpe changed it will then activate the other entity just before it is destroyed.

My plan is to use the Create entity utility and create special characters using the character of my choice, give them different names. These would only be used for spawning another entity and that is the beauty of it, you can spawn any entity (except an invisible wall -- haven't figured that one out yet). Anyway each character would have a hardcoded "ifused" property assigning a value of different names for each new character.

These instructions were not step by step and I hope that they are not too confusing as it is almost 4 in the morning. I got this idea and tested it when I got up to do my nightly duty. A person seems to have to do that more often when they are older.

As opposed to Highlander.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 11th Mar 2007 15:48
I started playing with this when I woke up again. There is no need to use the "create entity" utility. Just copy the fpe and bmp files and rename them. For example, I used a retexture by one the other members of the board - thanks Guitar. It was a demon type texture. So I have several fpe's. Demon_Zombie_1, Demon_Zombie_2 and so on. I used the same bmp but of course renamed them to match so that there is a selection. Then I modified each of the fpe files. See code below. Note the ifused line.



In my main script - demon_zombie.fpi - is where I activate the next demon_zombie. You notice I don't need a destroy script because I don't have to use a weapon. (Don't worry it fits right in with the story line). The following is the script. Notice that I placed the "activateifused=1" action just before the "destroy" action.

When the creature is destroyed another one is spawned. The next one is #2 and all of the properties are set accordingly for that character.




As opposed to Highlander.
Skywalker
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 14th Mar 2007 23:42
@ Flatlander
Great! I apologize for my belated response, this really is a great achievement. I will use this often and I appriciate your efforts.

Great Many Thanks,
Skywalker

"Its not how many times you fall its how many times you get back up!"
Robert F
User Banned
Posted: 15th Mar 2007 02:30
im pretty sure if you go into the enemys scripts, if you look at all the destroy scripts there is a destroy and activate script you can choose, never used it though so not sure

Robert F
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 15th Mar 2007 05:44
You're welcome sky.

RF, I haven't used that script yet as well so don't really know what it does or does not do.

As opposed to Highlander.

Login to post a reply

Server time is: 2024-11-23 13:18:27
Your offset time is: 2024-11-23 13:18:27