Scripting for Anti-Camp Mod
Moderator: Moderators
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
Scripting for Anti-Camp Mod
Hey guys! I'm a new modder...I've made a mod for my clan, that if you camp for 20 seconds, a bomb attatches to your head. I would like the bomb to attatch to your butt (actually one of the admins want that) but in the script "Butt" doesn't work...suggestions?
HeavenBound
I'm new at this
I'm new at this
Did you try arse or ass?
I am not a scripter but try this
I am not a scripter but try this
Code: Select all
buttbomb:
local.player = parm.other // defines who is touching the trigger
local.player attachmodel models/ammo/us_bomb.tik "bip01 Pelvis"

-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
U are the man! Pelvis worked like a charm! Thanks!211476 wrote:Did you try arse or ass?![]()
I am not a scripter but try this
Code: Select all
buttbomb: local.player = parm.other // defines who is touching the trigger local.player attachmodel models/ammo/us_bomb.tik "bip01 Pelvis"
HeavenBound
I'm new at this
I'm new at this
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
Yeah if they get to close they go BOOOOM!!211476 wrote:You mean if they get close to an opponent they blow up too? try posting the script up herewell, i have another delema...it blows opponents up. It's a punishment, not a reward. Fix?
aight here is the script...
main:
local.master = spawn ScriptMaster
local.master aliascache bombtick1 sound/items/Item_Timer_01.wav soundparms 0.7 0.0 1.0 0.0 10000 10000 local loaded maps "m1l2a m2 m3 m4l3 m5 m6l1 m6l3d dm moh obj train"
local.player=self
if(local.player.trigger!=1)
{
local.player.trigger=1
}
else
{
end
}
local.still = spawn trigger_multiple
local.still.origin = self.origin
local.still setsize ( -10 -10 -10 ) ( 10 10 10 )
for(local.timer=0;local.timer<20;local.timer++)
{
if!(self istouching local.still)
{
local.player.trigger=0
local.still delete
end
}
wait 1
}
local.player.trigger=0
local.still delete
local.mine = spawn script_model
local.mine model "items/explosive.tik"
local.mine.origin = ( local.player gettagposition "Bip01 Pelvis")//local.player.origin//
local.mine notsolid
local.mine attach local.player "Bip01 Pelvis"
local.player stopwatch 10
self iprint "Camping Get's You no where..." 1
self iprint "BOOOOOOOOM!!"
self stufftext "say I'm a camper and am going to explode."
self playsound streamed_dfr_scripted_M3L1_016a
self loopsound bombtick1
local.timer=0
while(isalive self)
{
wait 1
local.timer++
if(local.timer==10)
{
self stoploopsound bombtick1
local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
local.mine remove
local.Exp1.origin = local.mine.origin
local.Exp1 anim start
local.Exp2.origin = local.mine.origin
local.Exp2 anim start
wait 1
local.Exp1 remove
local.Exp2 remove
local.player.trigger=0
}
}
self stoploopsound bombtick1
local.mine remove
local.player.trigger=0
end
Btw, if u try to use this, it won't work. You have to have another File which i will not give, as this is for my clan only.
HeavenBound
I'm new at this
I'm new at this
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
Use the code thing when posting scripts.
The scriptbazookaexplosion.tik has a radius damage. Which means it damages everyone in the X radius. I commented it out. I left the fx_mortar_dirt in for the "explosion" and added self kill to kill the player and only the player. No one else will be harmed now.
Code: Select all
main:
local.master = spawn ScriptMaster
local.master aliascache bombtick1 sound/items/Item_Timer_01.wav soundparms 0.7 0.0 1.0 0.0 10000 10000 local loaded maps "m1l2a m2 m3 m4l3 m5 m6l1 m6l3d dm moh obj train"
local.player=self
if(local.player.trigger!=1)
{
local.player.trigger=1
}
else
{
end
}
local.still = spawn trigger_multiple
local.still.origin = self.origin
local.still setsize ( -10 -10 -10 ) ( 10 10 10 )
for(local.timer=0;local.timer<20;local.timer++)
{
if!(self istouching local.still)
{
local.player.trigger=0
local.still delete
end
}
wait 1
}
local.player.trigger=0
local.still delete
local.mine = spawn script_model
local.mine model "items/explosive.tik"
local.mine.origin = ( local.player gettagposition "Bip01 Pelvis")//local.player.origin//
local.mine notsolid
local.mine attach local.player "Bip01 Pelvis"
local.player stopwatch 10
self iprint "Camping Get's You no where..." 1
self iprint "BOOOOOOOOM!!"
self stufftext "say I'm a camper and am going to explode."
self playsound streamed_dfr_scripted_M3L1_016a
self loopsound bombtick1
local.timer=0
while(isalive self)
{
wait 1
local.timer++
if(local.timer==10)
{
self stoploopsound bombtick1
//local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
local.mine remove
//local.Exp1.origin = local.mine.origin
//local.Exp1 anim start
local.Exp2.origin = local.mine.origin
local.Exp2 anim start
self kill //kills player
wait 1
//local.Exp1 remove
local.Exp2 remove
local.player.trigger=0
}
}
self stoploopsound bombtick1
local.mine remove
local.player.trigger=0
end
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.
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
Sorry, As my sig says, I'm new at this. btw Thanks...Will this still make the explosion noise?$oldier Of Ra wrote:Use the code thing when posting scripts.
The scriptbazookaexplosion.tik has a radius damage. Which means it damages everyone in the X radius. I commented it out. I left the fx_mortar_dirt in for the "explosion" and added self kill to kill the player and only the player. No one else will be harmed now.Code: Select all
main: local.master = spawn ScriptMaster local.master aliascache bombtick1 sound/items/Item_Timer_01.wav soundparms 0.7 0.0 1.0 0.0 10000 10000 local loaded maps "m1l2a m2 m3 m4l3 m5 m6l1 m6l3d dm moh obj train" local.player=self if(local.player.trigger!=1) { local.player.trigger=1 } else { end } local.still = spawn trigger_multiple local.still.origin = self.origin local.still setsize ( -10 -10 -10 ) ( 10 10 10 ) for(local.timer=0;local.timer<20;local.timer++) { if!(self istouching local.still) { local.player.trigger=0 local.still delete end } wait 1 } local.player.trigger=0 local.still delete local.mine = spawn script_model local.mine model "items/explosive.tik" local.mine.origin = ( local.player gettagposition "Bip01 Pelvis")//local.player.origin// local.mine notsolid local.mine attach local.player "Bip01 Pelvis" local.player stopwatch 10 self iprint "Camping Get's You no where..." 1 self iprint "BOOOOOOOOM!!" self stufftext "say I'm a camper and am going to explode." self playsound streamed_dfr_scripted_M3L1_016a self loopsound bombtick1 local.timer=0 while(isalive self) { wait 1 local.timer++ if(local.timer==10) { self stoploopsound bombtick1 //local.Exp1 = spawn "fx/scriptbazookaexplosion.tik" local.Exp2 = spawn "animate/fx_mortar_dirt.tik" local.mine remove //local.Exp1.origin = local.mine.origin //local.Exp1 anim start local.Exp2.origin = local.mine.origin local.Exp2 anim start self kill //kills player wait 1 //local.Exp1 remove local.Exp2 remove local.player.trigger=0 } } self stoploopsound bombtick1 local.mine remove local.player.trigger=0 end
HeavenBound
I'm new at this
I'm new at this
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
No prob,
Sound? Let me check...yes, the tik has defined the explosion sound for the fx
Sound? Let me check...yes, the tik has defined the explosion sound for the fx
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.
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
Thanks 
Ok so i was stupid and misunderstood what i was told....They want the explosion...But They still want the -1 kills....help?
Edit : I think i got it...
So u think it will work?
Ok so i was stupid and misunderstood what i was told....They want the explosion...But They still want the -1 kills....help?
Edit : I think i got it...
Code: Select all
main:
local.master = spawn ScriptMaster
local.master aliascache bombtick1 sound/items/Item_Timer_01.wav soundparms 0.7 0.0 1.0 0.0 10000 10000 local loaded maps "m1l2a m2 m3 m4l3 m5 m6l1 m6l3d dm moh obj train"
local.player=self
if(local.player.trigger!=1)
{
local.player.trigger=1
}
else
{
end
}
local.still = spawn trigger_multiple
local.still.origin = self.origin
local.still setsize ( -10 -10 -10 ) ( 10 10 10 )
for(local.timer=0;local.timer<20;local.timer++)
{
if!(self istouching local.still)
{
local.player.trigger=0
local.still delete
end
}
wait 1
}
local.player.trigger=0
local.still delete
local.mine = spawn script_model
local.mine model "items/explosive.tik"
local.mine.origin = ( local.player gettagposition "Bip01 Pelvis")//local.player.origin//
local.mine notsolid
local.mine attach local.player "Bip01 Pelvis"
local.player stopwatch 10
self iprint "Camping Get's You no where..." 1
self iprint "BOOOOOOOOM!!"
self stufftext "say I'm a camper and am going to explode."
self playsound streamed_dfr_scripted_M3L1_016a
self loopsound bombtick1
local.timer=0
while(isalive self)
{
wait 1
local.timer++
if(local.timer==10)
{
self stoploopsound bombtick1
local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
local.mine remove
local.Exp1.origin = local.mine.origin
local.Exp1 anim start
local.Exp2.origin = local.mine.origin
local.Exp2 anim start
self kill// this adds the -1 kill, but the explosion is still there..
wait 1
local.Exp1 remove
local.Exp2 remove
local.player.trigger=0
}
}
self stoploopsound bombtick1
local.mine remove
local.player.trigger=0
end
HeavenBound
I'm new at this
I'm new at this