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 / how to make a entity spawn after a particular time?

Author
Message
GraPix
User Banned
Posted: 20th Aug 2009 18:31 Edited at: 20th Aug 2009 18:37
How to make an entity spawn after a particular time like a enity spawns after 20 sec? I think SPPAWNAFTERDELAY have something to do with this... but not sure.

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 20th Aug 2009 19:07 Edited at: 20th Aug 2009 19:07
true.. set spawn after delay to true and spawn time to 20*30 seconds..

EDIT: and ofcourse spawn at start to false..

GraPix
User Banned
Posted: 20th Aug 2009 19:27
Spawn At Start? No
Spawn After Delay? Yes

Delay 20 (there is no "spawn time")

but still its not working. plz help!

he doesn't spawn at all

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 20th Aug 2009 21:27 Edited at: 20th Aug 2009 21:28
Try it with spawn at start to true, he must spawn at start then after he dies there is a delay before the next spawn.

knxrb

Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 20th Aug 2009 22:49
Quote: "Try it with spawn at start to true, he must spawn at start then after he dies there is a delay before the next spawn."

ya forgot about that and he doesn't want it to

@GraPix: u'd have to write a script to spawn the entity after time using timers..

btw: (1 second = 30 in delay time) so for 20 seconds u should go with 600

GraPix
User Banned
Posted: 21st Aug 2009 18:59
Quote: "u'd have to write a script to spawn the entity after time using timers"


heres a script i wrote but it won't work.

i'm kinda n00b at scripting!



Please Help!

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 22nd Aug 2009 01:55
almost right..

add a trigger zone with this as the main script



then set the ifused propery for the trigger zone as the character's name..

GraPix
User Banned
Posted: 23rd Aug 2009 07:06 Edited at: 23rd Aug 2009 10:19
but how to use it? can u explain it more detailed?

well, i tried by putting a triggerzone and setting its main script as that u gave me and ifused property to the entity's name i wanna spawn. but he spawns from start.

I tried setting entity's SpawnAtStart to No but no luck and i also tried SpawnAtStart to No and SpawnAfterDelay to Yes but still no luck.

plz help

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 23rd Aug 2009 13:24 Edited at: 23rd Aug 2009 13:26
I don't think your script can work Bibo4PC. I think that it will activate the object as soon as you enter the trigger zone regardless of what you put in the script.

If you could explain what you're trying to achieve in a bit more detail it might be easier to advise you what you can do. It's probably easier to use another object to spawn the one you want after a delay. That is have the timer in "object a" and when it reaches the time spawn "object b". You still get the delay but both objects would spawn instantly.

I believe SpawnAfterDelay is only applicable after something has died once. I don't think you can use it to spawn a new character/object after a delay.

GraPix
User Banned
Posted: 23rd Aug 2009 13:50
Quote: "
If you could explain what you're trying to achieve in a bit more detail it might be easier to advise you what you can do."


I am trying to make a character spawn after 10 sec. And i have alot of entities aprom.14 i want all of them to be spawn after a delay of 10 sec each.

like:

entity_1: spawn after 10 sec
entity_2: spawn after 20 sec
entity_3: spawn after 30 sec
entity_4: spawn after 40 sec
entity_5: spawn after 50 sec
entity_6: spawn after 60 sec
and so on...

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 23rd Aug 2009 14:02
Ok, are they all going to spawn in the same room as you? Like waves and waves of enemies?

Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 23rd Aug 2009 14:32
Download the .fpm attached and put it in your mapbank in your FPSC folder.

Open the map in FPSC and run test game, don't change any settings.

Don't play the test game, just watch as the enemies continue to spawn.

End the test game and check the settings and then adjust for your own game.

The .fpm uses all stock media so there shouldn't be any problems loading it. I made it in the latest beta of 1.16 but don't see any reason why it wouldn't work in earlier versions.

Attachments

Login to view attachments
GraPix
User Banned
Posted: 24th Aug 2009 17:42
thanks... no problem in loading the .fpm file u uploaded. But i want each of them to be spawned in different locations. is it possible?

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
GraPix
User Banned
Posted: 24th Aug 2009 17:45
no problem loading it but i don't want that one spawned already.

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
GraPix
User Banned
Posted: 24th Aug 2009 17:54
Quote: "Ok, are they all going to spawn in the same room as you? Like waves and waves of enemies?"


Nope, in different locations!

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 25th Aug 2009 02:01
Quote: "I don't think your script can work Bibo4PC. I think that it will activate the object as soon as you enter the trigger zone regardless of what you put in the script."


I haven't actually tried it but why did I miss something?

Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 25th Aug 2009 11:05
Quote: "no problem loading it but i don't want that one spawned already."


Well you could spawn the original one via a trigger zone, but seeing as you want them to appear in different locations I don't believe it's possible the way I showed.

I think it is possible to do it like you want but I have a feeling it would be easier to achieve with a MOD which allows for entity timers instead of having to rely on the single global timer from Vanilla FPSC.

Quote: "I haven't actually tried it but why did I miss something?
"


No, I think your script is fine, but as far as I can see when an object is spawned via a trigger zone it is spawned instantly whether or not you want it to be.

GraPix
User Banned
Posted: 25th Aug 2009 17:47 Edited at: 26th Aug 2009 16:45
I am between a game project and i can't install a mod (bcz after installing it i cannot be able to edit previous levels)... can i?

if i can install a mod between a project then what MOD to use?

If not, can you plz code me script? I am still learning!


Peace!
Shivam

>>>>BUMP<<<<
>>>>BUMP<<<<

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
GraPix
User Banned
Posted: 27th Aug 2009 17:45
plz response (2 days left waiting for reply of my last question)

Your signature has been erased by a mod - please make it no larger than 999999999x999999999, thanks
Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 29th Aug 2009 11:14
You can start using a mod even if you have already starting making a level. Just make sure you back-up your levels first. Project Blue should have entity timers in it as they were in Ply's mod.

You're still going to have to script what you want, but it will be slightly easier as each entity can use it's own timer and you don't have to worry about other scripts interrupting your scripts and causing problems.

Sorry but I don't have the time to write the scripts for you. The best way for you to learn scripting is to do it yourself anyway. Download Flatlander's script editor, it can help find errors in your syntax before you try and use your script and wonder why it isn't working.

Login to post a reply

Server time is: 2024-11-25 06:28:07
Your offset time is: 2024-11-25 06:28:07