trigger to make an object in the spawn???

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
bloodstone
Private
Posts: 7
Joined: Mon Nov 24, 2008 9:31 pm

trigger to make an object in the spawn???

Post by bloodstone »

i was wondering how to make a trigger to make mustard gas release in the spawns to stop campers from staying in the spawns???ty
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

Well first you need a server-side mustard gas mod...
If you have one, post the tiki and I can help you further.
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.
bloodstone
Private
Posts: 7
Joined: Mon Nov 24, 2008 9:31 pm

ok

Post by bloodstone »

ok there's 4 tiki files in this mod...ill give u the first one in line... TIKI
setup
{
scale 1.0
path models/fx/dummy
skelmodel dummy2.skd
}

init
{
server
{
classname Explosion
constantdamage
damageeveryframe
// ghost
// svflags +sendonce
rendereffects +dontdraw
notsolid
radiusdamage 0.70
radius 500
meansofdeath fire
life 45
}

client
{
//
// !!! these values should be mimicked by the server-side simulation above !!!
//

originemitter initial
(
spawnrate 1.5
model Mustard_Gas.spr
color 1 1 1
spritegridlighting
alpha 0.5
collision
bouncefactor 0.8
life 10
scalerate 0.7
velocity 30
randvelaxis crandom 4 crandom 4 4
spin 0.133
offset crandom 10 crandom 10 range 20 20
angles 0 0 random 360
avelocity 0 0 crandom 20
scalemin 0.2
scalemax 1.0
fadedelay 1
fadein 0.5
)
}
}

animations
{
$path models/projectiles/M18_smoke_grenade
idle M18_smoke_grenade.skc
{
client
{
entry sound smokegrenade_exp_start
entry loopsound smokegrenade_exp_loop
entry commanddelay 29.9 sound smokegrenade_exp_end
}
}
}
bloodstone
Private
Posts: 7
Joined: Mon Nov 24, 2008 9:31 pm

Post by bloodstone »

i want to add a button to the wall so when when pushed by another player it release the smoke in the spwan..
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

Hmm so it'll smoke when spawned, no special animation required.
Make sure it is serverside.

..then I guess something like this:

Code: Select all

setup_trigger:

local.trigg = spawn trigger_use
local.trigg.origin = ( X Y Z )     //insert origin
local.trigg.angles = ( X Y Z )    //insert angles
local.trigg model "animate/alarmswitch.tik"
local.trigg setsize ( -20 -20 0 ) ( 20 20 20 )
local.trigg setthread triggered

end

triggered:

self nottriggerable

local.smoke = spawn script_model
local.smoke.origin = self.origin
local.smoke.angles = self.angles
local.smoke model " " //Your ModelPath no /models

self anim turnon

wait 5 //determine how long it smokes

self anim turnoff
local.smoke remove
self triggerable

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.
Post Reply