Page 1 of 2
Strip Player's weapons?
Posted: Tue Jun 15, 2004 10:50 am
by Cigs
im making a dm map for Spearhead and there's a basement i want players to be in without weapons. as soon as they pass a metal detector

they will be able to fight of enemies with only nades and maybe a handgun too !?
#1
I like to know how to strip a player's weapons (all OR all minus his/her handgun) with a trigger_multiple or ... ?
#2
I also like to know how to equip with nades i place on a table ? maybe point me to a thread ot tut, cause I haven't found one yet!
Cigs!
Posted: Tue Jun 15, 2004 2:42 pm
by lizardkid
okay you've got your trigger_multiple with a setthread alue of whatever you want it to be, and you just use the take command.... since this is dm and you don't know what weapon they'll have, we jsut take all the primary weapons.... so repeat the following code for all the weapon names you can think of.... i put a bunch in there for good measure.
parm.other take item weapon/enfield.tik
parm.other take item weapon/thompsonsmg.tik
parm.other take item weapon/mp40.tik
parm.other take item weapon/mp44.tik
parm.other take item weapon/bazooka.tik
parm.other take item weapon/sten.tik
actually you might have to experiement with that a little, i've never had reason to take stuff from a palyer but try it out!
trigger_multiple
Posted: Tue Jun 15, 2004 4:10 pm
by Cigs
tried setthread, easy way, didn't work.

i also tried differently. targetname/strip_trigger for trigger_multiple
Code: Select all
thread stripweapons
level waittill spawn
end
stripweapons:
while(1)
{
$strip_trigger waittill trigger
waitframe
parm.other take item weapon/enfield.tik
parm.other take item weapon/thompsonsmg.tik
parm.other take item weapon/mp40.tik
parm.other take item weapon/mp44.tik
parm.other take item weapon/bazooka.tik
parm.other take item weapon/sten.tik
}
end
but no taking away when i for instance had a sten in my hands!
what about
while(1)
{
for (local.i=1;local.i <= $player.size;local.i++)
{
$player[local.i]
take item weapon/... ???
$player[local.i]
take item weapon/... ???
$player[local.i]
take item weapon/... ???
}
waitframe
}
end
i
don't know how to do it right
do you

, lool, ty
Posted: Tue Jun 15, 2004 6:22 pm
by Cigs
nothing gets taken away! i stay equiped with all my weapons

Posted: Tue Jun 15, 2004 6:52 pm
by oddball
try parm.other takeall
Posted: Tue Jun 15, 2004 7:08 pm
by Cigs
thx, that worked!
Now, i can ask another Q ?
is there
a_good_sound that would do for stripping a player's weapons? can it be played by my trigger_multiple; like $strip_trigger playsound
a_good_sound
+
i like to give nades lying on a table.
will
parm.other give item weapon/weaponname.tik
work?
(i can place weapons to take, BUT nades ... you can only hear when picked up, you don't actually have nades)(maybe this is a problem with my SDK? dno :/ )
Giving 1 grenade? tut ???
Posted: Tue Jun 15, 2004 8:29 pm
by Cigs
I read
Giving and Taking Stuff from the Player from
MOH Miscellaneous Script Documentation.html (located in C:\Program Files\EA GAMES\MOHAA\SDK\docs)
$player ammo
type amount (is how to give ammo) (
*)
this is how i tried giving one grenade touching a trigger_multiple.
setthread/give_grenade
give_grenade:
$player ammo grenades 1
end
but it didn't work

Is there a thread or tut on SUPLYING GRENADES ?

addon_playerweapons_german_steilhandgranate spawns a grenade, makes a'sounds, but it doesn't g!ve the item :/
can i get explainations anywhere?
(
*) possible types:
grenades, pistol, rifle, smg (for sub-machineguns),
mg (for machineguns),
grenades, shotgun, heavy (for heavy explosive weapons like the bazooka)
Posted: Tue Jun 15, 2004 8:55 pm
by lizardkid
tyes are
pistol
rifle
smg
mg
heavy
grenade
and in Spearhead
smokegrenade
Posted: Tue Jun 15, 2004 10:49 pm
by nuggets
parm.other item weapons/M2Frag_Grenade_sp.tik
parm.other item weapons/steilhandgranate.tik
parm.other ammo grenade 5
parm.other ammo agrenade 5
Posted: Wed Jun 16, 2004 9:40 am
by Cigs
parm.other
grenade 5 WORKED

, all the other didn't
(ps: in MOH Miscellaneous Script Documentation.html it stated '
grenades' is a type

.... seems that is wrong, idd, it's '
grenade' that is, like you said!)
so parm.other
grenade 5 gives 5 british grenades. what about steilhandgranate ? .... do i have to be a german... or...
give addon_.. a [b]setthread[/b] key ?? possible
Posted: Wed Jun 16, 2004 9:43 am
by Cigs
and another thing can i give an addon_playerweapon_german_steilhandgranate a setthread/give_nade for instance?
Posted: Wed Jun 16, 2004 11:56 am
by Cigs
NEVERMIND
just had to place the addon_playerweapons_....grenades (ANY NADE TYPE), put a trigger_multiple over it setthread/give_nade
Code: Select all
give_nade:
waitframe
parm.other ammo grenade 1 // $player ammo type amount (type : grenade, pistol, rifle, smg (for sub-machineguns), mg (for machineguns), grenades, shotgun, heavy (for heavy explosive weapons like the bazooka)
self nottriggerable // so it gives only 1 nade
wait 20
self triggerable // so it can give a nade next time the thread is called
end
thx for helping out, guys !
Great!
metaldetector (stripping weapons)
Posted: Wed Jun 16, 2004 2:52 pm
by Cigs
Thx for the help guys!
I made a metaldetector

made a script to activate
a red light (script_model (model/
fx/dummy.tik) targetname/md_light)
+
show a
red corona. (addon_fx_corona_red-bright targetname/md_corona)
+
ofcourse the green
trigger_multiple setthread/metaldetector to acivate the thread
here's the script:
Code: Select all
// prep
$md_light light(1 0 0)
$md_light lightRadius 50 // CONTROL THE RADIUS OF THE LIGHT
$md_light notsolid
$md_light lightoff
for(local.d = 1;local.d <= $md_corona.size;local.d++)
$md_corona[local.d] hide
level waittill spawn
end
//------------------
// metaldetector
//------------------
metaldetector:
if !(level.pulseing == 1) // allows only one thread to run
{
level.pulseing = 1
self nottriggerable
iprintln_noloc "No weapons allowed!"
parm.other takeall
local.timer = 0
while(local.timer < 1)
{
for(local.d = 1;local.d <= $md_corona.size;local.d++)
$md_corona[local.d] show
for(local.d = 1;local.d <= $md_light.size;local.d++)
{
$md_light[local.d] lighton
$md_light[local.d] playsound detector_alarm
}
wait .5
for(local.d = 1;local.d <= $md_light.size;local.d++)
$md_light[local.d] lightoff
for(local.d = 1;local.d <= $md_corona.size;local.d++)
$md_corona[local.d] hide
wait .5
local.timer++
}
level.pulseing = 0
wait .5
self triggerable
}
end
it works just fine. maybe you like to make one of your own one day.
Thx again
Cigs!
Posted: Wed Jun 16, 2004 5:10 pm
by HotShizzle
hmmm cool i mite put it in my map
trigger_push PUSH PLAYER FORWARD, plz. - HORIZ.! NOT VERT.!
Posted: Thu Jun 17, 2004 1:51 pm
by Cigs
im still working on a trigger_push, to force someone to go true - when they go thrue - and forces not being able to go back.
this SHOULD be easy
~ angle/value
the trigger_push target/pushhere pushes UP only :/
the angle is not -1 not -2. tried every angle (0,90,...) tried even no angle.
angle/value doesn't work
angles/values( x x x) doesn't work
and trigger_push targets script_origin targetname/pushhere
