Post your scripting questions / solutions here
Moderator: Moderators
HeavenBound
Colour Sergeant
Posts: 85 Joined: Thu Sep 11, 2008 12:55 am
Post
by HeavenBound » Sat Mar 07, 2009 10:44 pm
Code: Select all
KAR98sniper:
local.trig = spawn trigger_multiple targetname triggerit
local.trig.origin = ( -2170 928 342 ) //roof
local.trig setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trig setthread got_KAR98sniper
local.trig wait 2
local.karsniper = spawn script_model targetname karsniper
local.karsniper model "weapons/KAR98sniper.tik"
local.karsniper = spawn script_model model models/weapons/KAR98sniper.tik origin ( -2193.915 915.958 295.125 )
local.karsniper.angles = ( 0 0 -183 )
local.karsniper rotateY ( 360.0 )
local.karsniper.scale = 1.0
local.karsniper notsolid
local.light = spawn script_model targetname light
local.light model "fx/corona_red.tik"
local.light = spawn script_model model models/fx/corona_red.tik origin ( -2193.915 915.958 350.125 )
local.light notsolid
local.light.scale = 1.0
end
//----------Got a Weapon----------
got_KAR98sniper:
local.player = parm.other
local.player playsound weapon
local.player give models/weapons/KAR98sniper.tik
local.player use models/weapons/KAR98sniper.tik
local.player iprint "You Picked up an Axis Sniper!"
end
that one works like a charm...I don't know which of the rest is screwing up the process...my server is being retarded, and my lan server isnt letting the mod do its thing so I have to wait to keep testing it. but the KAR sniper is working! =)
HeavenBound
I'm new at this
Tazz
Second Lieutenant
Posts: 155 Joined: Fri Feb 16, 2007 1:29 pm
Contact:
Post
by Tazz » Sun Mar 08, 2009 4:45 am
if that one works great then kewl but need to see the ones NOT working to figure out whats wrong =)
and btw SoR.....i dont use whereami to get coords either lol
i usually use viewpos....guess cuz thats just what i started with
$oldier Of Ra
Lieutenant Colonel
Posts: 404 Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:
Post
by $oldier Of Ra » Sun Mar 08, 2009 9:56 am
Code: Select all
local.karsniper = spawn script_model targetname karsniper
local.karsniper model "weapons/KAR98sniper.tik"
local.karsniper = spawn script_model model models/weapons/KAR98sniper.tik origin ( -2193.915 915.958 295.125 )
*rubs eyes* You spawn the kar in 2 different ways with the same variable?? Replace this part with the following:
Code: Select all
local.karsniper = spawn script_model model models/weapons/KAR98sniper.tik origin ( -2193.915 915.958 295.125 )
Why show me the one that's working? How on earth can I help you then?
HeavenBound
Colour Sergeant
Posts: 85 Joined: Thu Sep 11, 2008 12:55 am
Post
by HeavenBound » Mon Mar 09, 2009 7:04 pm
Thanks Sor... u actually fixed a glitch I was having just with that lol.
The mod has been released @ modtheater.com. Search Ultimate Algiers.
=)
HeavenBound
I'm new at this