Page 1 of 1

Activating a button once a weapon is lifted OR giving a player a weapon

Posted: Tue Nov 29, 2022 3:48 pm
by Captain JO
Hello,
so I like to make maps but have no idea how to script anything an I would like to add a feature where if an item is picked up it activates something kind of like in Indiana Jones where a trap activates once he lifts up the treasure.

If anyone knows how to script this help would be very nice

Thank you in advance :mrgreen:

Re: Activating a button once a weapon is lifted OR giving a player a weapon

Posted: Mon Dec 12, 2022 3:14 am
by Mighty Spirit the 2
To make a trap in the map editor use triggers to create cinematic moments. I wouldn't use scripting as that's far too complex for smth simple.
I made a small test map example.
The treasure is the Katana.
Here are some small clips i took -> https://imgur.com/a/JqnKdFY
"OnDestroyTrigger" monitors the Katana, and checks if it disappears. If this happens, it will trigger a "DestroyTrigger" which destroys the rocks which are holding back a huge ball. That's about as simple as it gets. You can make the effect much more dramatic, add for example Screen shacking, and explosion trigger and SpawnFire trigger. Use your fantasy.

Re: Activating a button once a weapon is lifted OR giving a player a weapon

Posted: Mon Dec 12, 2022 3:01 pm
by Captain JO
Thank you so much!
I actually didn't realize that OnDestroyTrigger would activate once an item was picked up so thats what I was struggling with but now I will just use your method!
:mrgreen:

Re: Activating a button once a weapon is lifted OR giving a player a weapon

Posted: Tue Dec 13, 2022 1:20 am
by Mighty Spirit the 2
I didn't know this either, until i tried it....
At first i tried at writing a script but i'm glad that was totally unnecessary. :D