PDA

View Full Version : A quick question



HDoan
August 14th, 2007, 12:42 AM
How can we set something to only detonate if something steps over it or is driven over it

Archon23
August 14th, 2007, 12:48 AM
You know if there is actually something like that then I wonder where the fuck that Indiana Jones map is........

HDoan
August 14th, 2007, 12:52 AM
So it isnt possible?

Archon23
August 14th, 2007, 01:08 AM
Sorry I kinda misworded it. I don't know myself. That was just a joke really. >_>

Edit: Also are you trying to make a landmine?

Hunter
August 14th, 2007, 09:25 AM
you use a trigger volume and a flag.

put the trigger volume where you want the player to step to make a explosion, and name the trigger volume "step".

then make a flag were you want the explosion and name it "explosion"

make sure that your trigger volume is big enough for a warthog to fit in.

now copy this script into notpad and save it as "script.hsc" (make sure that you select "All Files" in the file type selection part)



(script continuous mines
(begin
(sleep_until (volume_test_objects step (players)) 0)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 1)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 2)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 3)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 4)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 5)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 6)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 7)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 8)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 9)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 10)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 11)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 12)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 13)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 14)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
(sleep_until (volume_test_objects step (players)) 15)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
(sleep 33)
)
)

Tarzan
August 14th, 2007, 09:54 AM
this script will to the exact same thing without waiting a second to check between each player... faster, and less data.



(global short number)

(script continuous mines
(if (= (volume_test_objects step (list_get (players) number) true)
(effect_new "vehicles\scorpion\shell explosion" "explosion")
)

(set number (+ 1 number))

(if (= (> 15 number) true)
(set number 0)
)
)

Hunter
August 14th, 2007, 10:03 AM
yep, it will, i just got that script from EHS quickly because i was busy.

Tarzan
August 14th, 2007, 10:37 AM
I should talk to guru... have him stick another one of my scripts in there then - lol.... he likes the many-case trees instead of the loops. On slower computers, a loop sometimes won't activate the trigger, but those case trees are really a crap shoot because of the time the script spends idle waiting between checks.

Hunter
August 14th, 2007, 11:01 AM
lol, he needs some more scripts for it, so give him as many as you can. V3 is looking good as well.

HDoan
August 14th, 2007, 11:42 AM
So this is for a weapon right =/ and Yes I am making a trip mine

Jay2645
August 14th, 2007, 07:50 PM
Lol, don't listen to these guys if you are making something like a cross between a land mine and a C4.
OK, what you need to do (No scripting involved) is simply make it constantly shoot an invisible projectile about 3-6 feet or so in the air. If that projectile hits something, then make it detonate.
Simple and effective.

HDoan
August 14th, 2007, 08:08 PM
Lol, don't listen to these guys if you are making something like a cross between a land mine and a C4.
OK, what you need to do (No scripting involved) is simply make it constantly shoot an invisible projectile about 3-6 feet or so in the air. If that projectile hits something, then make it detonate.
Simple and effective.
So set it so constantly fire invisible projectiles in the air, and set the model-collision-geometry to have abody vitality of 1 so when it gets damaged it blows up or when the projectile blows it it gets damaged and disapears? And how do we make projectiles invisible

Jay2645
August 14th, 2007, 08:11 PM
Exactly.
And you make projectiles invisible by not assigning a model or contrail to them. Tool and Sapien may bitch at you a little, though (Well, maybe not Sapien), but it won't stop it from compiling the map.

HDoan
August 14th, 2007, 08:24 PM
I have a tripmine as a third weapon, when you throw it, it rhwos the tripmine projectile, how would I get the projectile to shhoot out projectiles

Roostervier
August 14th, 2007, 08:28 PM
No, these are for set mines. You won't be able to carry it. Doing the explosion is like the same for the needler, try looking at it. Notice how one projectile doesn't explode large, but multiple explode huge. Just take a look at those tags and do something similar.

Tarzan
August 14th, 2007, 08:53 PM
Lol, don't listen to these guys if you are making something like a cross between a land mine and a C4.
OK, what you need to do (No scripting involved) is simply make it constantly shoot an invisible projectile about 3-6 feet or so in the air. If that projectile hits something, then make it detonate.
Simple and effective.

Semi-bad idea: lag is one... syncing is another. I don't think that the projectiles would be at the same time when new people joined the game. Unless it was so fast that there was no pause between projectiles... but then there's the lag factor.

TeeKup
August 14th, 2007, 09:37 PM
Lol, don't listen to these guys if you are making something like a cross between a land mine and a C4.
OK, what you need to do (No scripting involved) is simply make it constantly shoot an invisible projectile about 3-6 feet or so in the air. If that projectile hits something, then make it detonate.
Simple and effective.

Excuse me? Thats the most ineffecient way to do that. :I Listen to what the other 2 said earlier in the thread.

Jay2645
August 14th, 2007, 10:56 PM
However, those work by trigger volumes. What he wants is a weapon similar to a C4.
It does sync, a friend of mine once played with me on a mod he made where the pistols always shot (Lol, it was fun, cause you didn't have to click, you just had to aim and a few shots later they died).
Also, there is no lag whatsoever, surprisingly. I wouldn't recommend putting more then 4 in one map, but anything under that will work fine. On most CMT maps, you always have bullet fire somewhere, so it really won't lag much worse then they do.