okay, i got a scripted pickup and im trying to make it swap with weapons on the ground..... would this work:
i put if the player presses use key to swap his gun, theres other invisible guns inside the gun on the ground. when player swapps, he gets his gun and the gun he swapped invis gun becomes vis
weapon swappage idea
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
weapon swappage idea
Herp derp.
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
slash that idea.
okay, im doing drop weapon move a pickup next to player. it works, cept for the fact that if i drop it, pick it up and drop it i automatically pick it back up. heres my two scripts
okay, im doing drop weapon move a pickup next to player. it works, cept for the fact that if i drop it, pick it up and drop it i automatically pick it back up. heres my two scripts
Code: Select all
{
Spawn[ ()
{
Console(true); //Turns on debug
Gravity(false); //No grav
SetNoCollision(); //No collision
BoxHeight(75); //height of bounding box
HideFromRadar(true); //uh... speaks for itself
BoxWidth(75); //width of bounding box
LowLevel("Setup");
} ]
Setup[ ()
{
PawnRender(false);
self.think = "Wait";
} ]
Wait[ ()
{
self.ThinkTime = "0.1";
if(IsKeyDown(30))
{
if(self.player_weapon = 10)
{
SetPosition("mg", self.player_X, self.player_Y, self.player_Y, true, true);
}
}
} ]
}Code: Select all
{
X [0]
Y [0]
Z [0]
Spawn[ ()
{
Console(true);
BoxWidth(20);
BoxHeight(20);
SetCollision();
AddCollisionOrder("Setup");
} ]
Setup[ ()
{
LowLevel("Idle");
} ]
Idle[ ()
{
if(GetAttribute("galil","Player") < 1 and (GetAttribute("m16","Player") < 1))
{
if(GetAttribute("mp7","Player") < 1 and (GetAttribute("mac","Player") < 1))
{
if(GetAttribute("mg36","Player") < 1 and (GetAttribute("awp","Player") < 1))
{
if(GetAttribute("m3","Player") < 1)
{
ModifyAttribute("mg36", 1, "Player");
ModifyAttribute("mg_shell", random(25,80), "Player");
PlaySound("respawn.wav");
TeleportEntity("mg" , "temp" );
}
}
}
}
} ]
}Herp derp.
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA