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 Product Chat / Official Community Guide question

Author
Message
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 22nd Oct 2013 23:28
I tried the triggering a barrel to explode and it did not work at all.I was wondering if my version had something to do with it.I have v1.19.If someone had another way to do this with a trigger please let me know how you did it.
Thanks
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Oct 2013 00:33
Quote: " tried the triggering a barrel to explode and it did not work at all.I was wondering if my version had something to do with it.I have v1.19.If someone had another way to do this with a trigger please let me know how you did it."


Versions make no difference. When you place the barrel, ensure that it is dynamic. Also make sure the "strength" is not set to zero (that makes it invulnerable). Set the "explodable" field to "yes", and give the barrel a name (example- barrel_1).

Here is an example script to use for the barrel- assign the script to the barrel's main:



The barrel will wait until the trigger "activates" it and will destroy.

Next, place your trigger. Here is an example script for the trigger which gets assigned to the main:



I use the "settargetname=x" command, but you can replace that with "activateifused=1" and put the name of the barrel in the IfUsed field of the trigger.

You may need to alter to suit your needs, but the concept is there.


There's no problem that can't be solved without applying a little scripting.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 23rd Oct 2013 01:48
BlackFox,
Thanks for the scripts
so this means I don't need a detonator?
Teabone
Valued Member
20
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 23rd Oct 2013 01:57 Edited at: 23rd Oct 2013 01:57
What exactly are you trying to achieve? A switch that makes it explode? Or a trigger zone?

(Teabone)
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 23rd Oct 2013 08:38
Teabone,
I prefer a trigger but yeah I want to explode some barrels. I tried it out and it worked with out a detonator.
ncmako
14
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 23rd Oct 2013 17:30
riccetts
By chance are you looking for something like this...http://forum.thegamecreators.com/?m=forum_view&t=182867&b=23
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 23rd Oct 2013 17:44
ncmako,
No, I want to preset some some barrels and crates to explode when the user hits the trigger. But I would like to incorporate some fire along with it after the explosion. I just haven't figured that out yet.
But thanks for the link anyway.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 23rd Oct 2013 18:26
I tried the scripts again and now the barrel just disappears. It exploded yesterday just fine and I set it up right so why is it not exploding?
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 26th Oct 2013 21:06
Bump
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 26th Oct 2013 21:24
The reason the barrel does not "explode" is because the command "destroy" is called, which removes the barrel. In order for it to explode, you would need to have the command "subhealth=100" (I use this value if the health is set below 100 to start with) in it's destroy script *before* the "destroy" command.

So if you want an example of a destroy script with an explosion and a bit of camshake, here is an example I use with landmines. The following is the destroy script for the barrel:



and the script I would use to activate the barrel's destroy script is as follows (set to the barrel's main script)...



The trigger script would be the original I gave you in the previous example. The key difference is in the first example, we activated the barrel via trigger which is destroyed (removed). In this case, prior to destroying, we subtract health from the barrel (same effect as if you shoot it).


There's no problem that can't be solved without applying a little scripting.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 27th Oct 2013 16:34
Thanks Blackfox
It works now.

Login to post a reply

Server time is: 2026-06-08 21:34:37
Your offset time is: 2026-06-08 21:34:37