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 / Can I have this script?

Author
Message
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 26th Oct 2007 06:52
Where you press a switch and it kills enemies in the next room? I really need this for my game... Can anyone help?


Click here to join my design team, EARTH PRODUCTIONS
Pain
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 4th Apr 2007
Location: Lake Orion, MI - USA
Posted: 26th Oct 2007 18:14 Edited at: 26th Oct 2007 18:14
don't kno if thats really possible... u got me looking into it lol

pain

Me = noob

and i love The TGC : )
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 26th Oct 2007 18:49
Thanks pain... I think I can move around that one... Thanks anyways.


Click here to join my design team, EARTH PRODUCTIONS
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Oct 2007 19:44
This is completely possible, guys.

All that you need to do is script into the enemy's AI is a check for an activation value that the switch will give them. If that activation value is met, then run the "Destroy AI' on the enemies.


Example and untested scripts:

For your switch, make this script-



Obviously, this switch cannot be turned off... I mean, you don't want to bring your guys BACK to life, do you?

Now put this line near the bottom of your enemy's Main AI script:



Now in your switch's properties, put the name of your enemy entity in the "IfUsed" field.


Tada!!! Now, when you press the switch, all the enemies with the name you gave the switch will die!!!


Hope that helped, Orrion.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

(P)suedo code (L)inguist, (Y)ou (Sti)ll (R)eap (E)verything
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 26th Oct 2007 21:18
Thanks, I'll try it out. Your the best.


Click here to join my design team, EARTH PRODUCTIONS
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 26th Oct 2007 21:29
Nope, could you make it a script that I can download instead? I'm still new to making scripts.


Click here to join my design team, EARTH PRODUCTIONS
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Oct 2007 09:31
Well, Orrion, the bad part about that is I don't know which AI script you are trying to use for your enemy. I tried to give you a general solution so that you could do it yourself.

I'll see if I can find time to actually test it and make it work. If you can wait until then (or if someone else can come to help), I'd be happy to make this for you.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 27th Oct 2007 09:50
Y dont u press button in one room which spawns a barrel in the other with the enemies, then the barrel explodes!

enemies are toast and you get your wish of an enemy graveyard

You can tell i'm an old-school gamer, right?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Oct 2007 20:50
Answer:

Because forcing a barrel to blow up without the player shooting it would be hard to do.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 28th Oct 2007 01:07
Quote: "Well, Orrion, the bad part about that is I don't know which AI script you are trying to use for your enemy. I tried to give you a general solution so that you could do it yourself."


I'm using the shoot10 script for the enemies and I made a modifided switch script of switch1.

Quote: "I'll see if I can find time to actually test it and make it work. If you can wait until then (or if someone else can come to help), I'd be happy to make this for you."


Yeah, I can wait... How long would it be? If it's longer than november 10th... I'm screwed. But, thanks for making this script for me.


Click here to join my design team, EARTH PRODUCTIONS
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Oct 2007 07:24
Okay first things first... the "switch script" I gave you is not to be put into another script... that's just the whole script for the switch, lol.

And... for the enemy AI, just put that line of code I gave you right above the ";End of script" line in the AI code. Underneath all the other lines of script.


Now, also make sure you put the name of your enemy into the switch's "IfUsed" property. If you didn't, then the enemies won't be effected by the switch.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 29th Oct 2007 00:28
Yeah, I did that with that enemy AI script.

I didn't know the switch was surpose to be it's own script... Still, I have no idea on how to write a script... I would really appriciate it if you made it a script for me... Thanks.


Click here to join my design team, EARTH PRODUCTIONS
Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 29th Oct 2007 00:35 Edited at: 29th Oct 2007 00:36
Quote: "Because forcing a barrel to blow up without the player shooting it would be hard to do. "

Its quite easy....

Just change this:
Spawn at start - no.
Spawn after delay - yes.
Spawn life - 1 (seconds)
---EDIT---
Mostly the barrel is dynamic...but its settings with explosion is
disabled...so
Change the
Explodable - no to yes.

Also:
If key used - (trigger here)


And also:
If you want it to be just transparent...like its not a barrel
thats suddenly spawned(which looks weird)...
Than you can make a black (0,0,0...rgb) 256x256...or lower
texture....and apply that as texture...
So it would spawn...but....its transparent, therefore it looks like an explosion that came out of nothing? or maybe a bomb...etc..

Almost forgot...
Name the entity for example - 1.
And add to the trigger:
If used - 1.


Hope it helped...


Cheers,
Cheese Cake.


Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 29th Oct 2007 00:45
SO, would there be scripting involed? If not, I could go with that.


Click here to join my design team, EARTH PRODUCTIONS
Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 29th Oct 2007 01:33
No there wont be scripting involved....


Cheers,
Cheese Cake...


And if you need a clearer example....than i can post it.


Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 29th Oct 2007 02:01
Cool.


Click here to join my design team, EARTH PRODUCTIONS
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Oct 2007 21:05
Ah, nice! I had no idea that when an explodable object's spawn life reached 0 that it would blow up!

Very clever, CC.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 30th Oct 2007 00:26
Yeah.


Click here to join my design team, EARTH PRODUCTIONS
Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 30th Oct 2007 12:27
Yeah plystire, i also wanted a effect that when you walked in a
triggerzone that suddenly something would blow up.

And i am no good at scripting, so didnt checked it in scripting...
But thought of another idea.


Anyway hope it was the effect you needed Orrion Carn.


Cheers,
Cheese Cake.


Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 30th Oct 2007 21:35
Well, not so much as an explosion I needed... I need that you pless a switch and *Suck* all the air out of the room... Killing all of the people in the next room, but, you in a suit that protect you, with it's own air tank... So, that's kinda what I needed it to do... With the effect that I just explained.


Click here to join my design team, EARTH PRODUCTIONS
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Oct 2007 22:57
If that's what you need then you may want to give my script another go, because it should kill the enemies without an explosion once the switch is pressed.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Oct 2007 23:22
Okay, I got it to work and I did some revisions to make it look better.

Put these lines of code right after the ";Triggers" line in your enemy's Main AI as well as their Shoot AI:




Now, here is the entire script for your switch. (I'm assuming you're using a non-animating switch... the ones that just change their textures)



Now REMEMBER to put the name of your enemy into the switch's "IfUsed" property, otherwise this won't work!


Enjoy!


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 31st Oct 2007 00:03
K, let me try it out.


Click here to join my design team, EARTH PRODUCTIONS
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 31st Oct 2007 00:08
WORKED PERFECTLY!!! Thanks for the script.


Click here to join my design team, EARTH PRODUCTIONS
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 31st Oct 2007 01:47 Edited at: 31st Oct 2007 01:53
Glad I could help!


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 31st Oct 2007 02:19
Again, thanks.


Click here to join my design team, EARTH PRODUCTIONS

Login to post a reply

Server time is: 2024-11-24 02:03:07
Your offset time is: 2024-11-24 02:03:07