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 / explosives

Author
Message
mcattack
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 19th Mar 2009 11:13
Is there a way to script a trigger zone to create an explosive effect at another location (like a grenade explosion).
If so can some tell me how to make. (im terrible at scripting)

people are like slinkeys, serve no purpose in life but make jump up in down in amusement when you push them down the stairs
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 19th Mar 2009 17:37
I have been helping my wife with her game design. She has a level where the player enters a room with 3 entrances, 2 of which are blocked with crates. The player will walk up to the blocked entrance and see that there is a passage, but can't push the crates. When the player finds a scroll through the first entrance, the crates are destroyed even though the player is in a different location. I'll share what I did and feel free to use it or modify to your liking.

The first thing we did was set the crates up at the entrance. We used small crates and had two stacks of three. The properties for the crates were set to the following:

Strength- 1
Explode Damage- 10
PhysicsForceDamage- 100
isImmobile- Yes

I then created two barrels, calling them both cylindera. I positioned them above the ground and made sure they were touching the crates. These are used to explode the crates when the trigger is activated. The properties for the cylindera were set to the following:

Spawn at start- No
Strength- 1
Physics Force Damage- 9999
Explode Damage- 100

The next step was to set the trigger. My wife had it placed overtop the first scroll the player had to pickup. Properties for the trigger were as follows:

Script- plrinzoneactivateused.fpi
If Used- cylindera

The trigger is activated when the scroll is picked up, which spawned the barrels and then the barrels exploded both themselves and the crates, making the 2nd entrance accessible.

For the third entrance, the same steps were repeated, except I called the barrels cylinderb, and the trigger in the 2nd scroll had cylinderb in the IfUsed field.

Please note that we used the crates from the Egyptian model pack, the barrels were from the WW2 section. You may need to tweak depending on what you are using. However, this should give you an idea how to set an explosion using a trigger.

Login to post a reply

Server time is: 2024-11-24 21:38:23
Your offset time is: 2024-11-24 21:38:23