everywhere placeable explosive......?
Moderator: Moderators
everywhere placeable explosive......?
I saw it on one AA server, anyone have script?
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
You must be meaning Elgan's sticky bombs. You can get it over at www.mods-r-us.net but it seems to be down right now.
I'd give you my version but I modified it too much from the original.
I'd give you my version but I modified it too much from the original.
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
-
Herr Klugscheisser
- Lance Corporal
- Posts: 21
- Joined: Thu Mar 17, 2005 1:14 pm
I wouldn't use that as you can throw the bombs through unbroken windows(probably doors too, but not sure) as well as throw through walls (if you are standing right up to the wall) into the next room. I was going to use his stickybomb script as a base until I learned it haad these problems. He used the AI nade throw script. You can solve the throwing through doors by moving the start of the trace back behind the player I believe (I probably trashed that script).
Also there is{sfx}Phils plunger/radio bomb charges.

The sticky bombs are in Elgans Admin-Pro as well as laying proximity mines.
SH/BT users could mod in the real sticky model and BT users could mod in the mine model.



Also there is{sfx}Phils plunger/radio bomb charges.

The sticky bombs are in Elgans Admin-Pro as well as laying proximity mines.
SH/BT users could mod in the real sticky model and BT users could mod in the mine model.



-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
Hmm... those side-effects are new to me. Klug, so what must I do to stop the bombs going thru doors etc? Here's my modified version of the throwing script:
Aprop, use this script (I made it quickly):
Code: Select all
//----------------------------------------------
main local.player local.model local.scale:
//----------------------------------------------
// Calculate the vertical height of the throw
local.vertical = (local.player getcontrollerangles 0)[0]
local.vertical = 0 - local.vertical
//wait 1
//throwing animation, unfortunately not First-Person viewable
local.player forcetorsostate RELEASE_ATTACK_GRENADE
wait 0.15
// This next section is to return the player to a default state.
// Apparently without this, he cannot throw something again.
if ( (local.player getposition)[0] == "c" )
{
local.player forcetorsostate STAND
//local.player forcelegsstate CROUCH_IDLE
}
else if ( (local.player getposition)[0] == "s" )
{
local.player forcetorsostate STAND
//local.player forcelegsstate STAND
}
local.player playsound m2frag_snd_grenade_throw weapon
// Calculate Destination spot
local.start = self gettagposition "eyes bone"
local.fwd_vec = angles_toforward local.player.viewangles
local.hit_location = local.start + local.fwd_vec * 16
local.dest = trace (local.start + local.fwd_vec * 64) (local.start + local.fwd_vec * 500) 1
local.mine = spawn script_model "model" local.model
local.mine solid
local.mine.scale = local.scale
//local.org = local.player.origin
//local.org[2] = local.org[2] + 90
local.mine.origin = local.hit_location
local.vect = (local.dest - local.player.origin)
local.vect = vector_normalize (local.vect)
// Calculate distance to destination
local.dist = vector_length (local.player.origin - local.dest)
// Calculate the bow of the throw
local.vect[0] = local.vect[0] * (local.dist / 1.5) * 3
local.vect[1] = local.vect[1] * (local.dist / 1.5) * 3
local.vect[2] = local.vect[2] * local.dist * ( local.vertical / 5 )
local.vect[2] = local.vect[2] + local.vertical
local.mine physics_on
local.mine rotateX (local.vect[0] / 3)
local.mine physics_velocity local.vect
local.isplayer =1
while(local.isplayer == 1)
{
local.mine waittill touch
local.hit = parm.other
if!(local.hit==local.player)
{
local.isplayer = 0
local.mine rotateX 0
local.mine.angles = ( 0 0 0 )
local.mine physics_off
local.mine.velocity = ( 0 0 0 )
}
}
if (local.hit == $player)
{
local.mine attach local.hit "Bip01 Head"
}
end local.mineCode: Select all
setup:
local.tr = spawn trigger_use
local.tr.origin = ( X Y Z )
local.tr setsize ( -20 -20 -30 ) ( 40 40 50 )
local.tr setthread pickup
local.it = spawn script_model model "items/explosive2.tik"
local.it.origin = local.tr.origin
local.it notsolid
local.it scale 1.6
local.tr.item = local.it
end
pickup:
local.p = parm.other
local.team = local.p.dmteam
local.p playsound pickup_explosives
self.item remove
local.p iprint "You picked up the explosives!"
while(isAlive local.p && local.p != NIL && local.p != NULL && local.p.dmteam == local.team)
{
local.time = 0
while (local.p.useheld == 1 && isAlive local.p && local.p != NIL && local.p != NULL && local.p.dmteam == local.team)
{
waitframe
local.time += 0.05
}
if (local.time >= 1.00)
{
local.bomb = spawn script_model model "items/explosive2.tik"
local.bomb.origin = local.p.origin + ( 0 0 40 )
local.bomb notsolid
local.bomb droptofloor
local.bomb thread explo
local.p playsound plantbomb1
local.p iprint "Bomb planted!"
waitframe
end
}
wait 0.1
}
end
explo:
self.exploding = 1
self thread blinky
self loopsound bombtick
wait 20
self stoploopsound
self loopsound final_countdown
wait 10
self stoploopsound
self.exploding = 0
waitframe
local.exp = spawn models/animate/fx_mortar_dirt.tik
local.exp.origin = local.origin
local.jitter = spawn func_viewjitter "targetname" "viewjitter"
local.jitter.origin = local.origin
local.jitter jitteramount ( 3 2 2 )
local.jitter duration 1.0
local.jitter radius 150
local.or = spawn script_origin
local.or.origin = self.origin
local.exp anim start
radiusdamage local.or 200 150
waitframe
local.jitter doActivate $world
self remove
wait 2
local.or remove
local.exp remove
local.jitter remove
end
blinky:
local.b = spawn script_model model "fx/corona_red.tik"
local.b.origin = self.origin + ( 0 0 15 )
local.b notsolid
while (self.exploding == 1)
{
local.b hide
wait 0.5
local.b show
}
local.b remove
endOur official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
-
Herr Klugscheisser
- Lance Corporal
- Posts: 21
- Joined: Thu Mar 17, 2005 1:14 pm
I would have to see if I can locate any remnants of that because I gave up after it would still go throw windows. Also, I think if you looked straight up it would throw them and stick to the skybox.
I haven't played with that stuff since around August. I was glueing items to grenades(which break windows of course
) and making server side snowballs and molotovs. When Jethro was asking about stuff on TMT I became motivated, but I have not looked at the scripts in awhile.
Here are some videos of this. I'm not even sure what version of the stickybombs I was using in the last vid.
http://www.youtube.com/watch?v=waPQwIuqCLY
http://www.youtube.com/watch?v=jsx53CsT1AM
http://www.youtube.com/watch?v=XxeRpcZ0mYU
I haven't played with that stuff since around August. I was glueing items to grenades(which break windows of course
Here are some videos of this. I'm not even sure what version of the stickybombs I was using in the last vid.
http://www.youtube.com/watch?v=waPQwIuqCLY
http://www.youtube.com/watch?v=jsx53CsT1AM
http://www.youtube.com/watch?v=XxeRpcZ0mYU
Thank you soldier, ill try it when i finish what im actually work'on... but ill edit it a little, make player drop bomb when die,let another pickup etc
btw
RELEASE .... its an animation... so i asume i can force player to play every anim(but non 1st person viewable)? And forcelegsstate is for player legs?
btw
Code: Select all
local.player forcetorsostate RELEASE_ATTACK_GRENADE -
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
Hehe, don't use that first script Aprop, it's not not what you need. And didn't you request this before? I could have sworn you asked the same thing a month ago and I already gave you a script then...
Well actually RELEASE_ATTACK_GRENADE is a state which I forced upon the player. A state can execute animations but more importantly it knows when to execute the proper animations and how/when to go back to other states so the player doesn't get "stuck" or "glitch".
Not all states work so well when forced which is why I had to force the player to state STAND which is the main state and basically does nothing, it just waits till a player needs to enter another state(in this case any other state like the KILLED state, RAISE_WEAPON states...etc)
Anyways I'm curious about what you're making, keep us informed!
To klug; those are awesome mods m8
, any of them released??
Well actually RELEASE_ATTACK_GRENADE is a state which I forced upon the player. A state can execute animations but more importantly it knows when to execute the proper animations and how/when to go back to other states so the player doesn't get "stuck" or "glitch".
Not all states work so well when forced which is why I had to force the player to state STAND which is the main state and basically does nothing, it just waits till a player needs to enter another state(in this case any other state like the KILLED state, RAISE_WEAPON states...etc)
Anyways I'm curious about what you're making, keep us informed!
To klug; those are awesome mods m8
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.