Immune

Post your scripting questions / solutions here

Moderator: Moderators

chrisjbooth2001
Colour Sergeant
Posts: 77
Joined: Thu Dec 18, 2003 12:57 am

Post by chrisjbooth2001 »

Well there will be openings so this is important...
kai0ty
Brigadier General
Posts: 507
Joined: Fri Mar 19, 2004 1:45 am

Post by kai0ty »

openings like doors, or openings like hallways?
also u could just force them to holster with

$player holster
There are only 10 kinds of people in this world; those who know what binary is, and those who don't.
dcoshea
Colour Sergeant
Posts: 94
Joined: Thu Mar 04, 2004 3:00 am
Location: Sydney, Australia
Contact:

Post by dcoshea »

kai0ty wrote:openings like doors, or openings like hallways?
also u could just force them to holster with

$player holster
Good idea, except:
Game Module Classes documentation for Player wrote:holster
Holsters all wielded weapons, or unholsters previously put away weapons
It's a toggle, so it will keep holstering and un-holstering every time you call it. Who knows what might happen if you call it every frame or every 0.1 seconds - it might make the gun permanently stay holstered, or it might make it permanently stay out?
safeholster( Boolean putaway )
Holsters all wielded weapons, or unholsters previously put away weapons
preserves state, so it will not holster or unholster unless necessary
Maybe 'local.player safeholster 1' could be called in a tight loop (every 0.1 seconds or so) and that would do it?

Regards,
David
chrisjbooth2001
Colour Sergeant
Posts: 77
Joined: Thu Dec 18, 2003 12:57 am

Post by chrisjbooth2001 »

will go through this tomorrow ;)
Ramah Palmer
Warrant Officer
Posts: 131
Joined: Sun May 25, 2003 10:13 am
Location: Nottinghamshire: UK

Post by Ramah Palmer »

I know this is an old topic but I was searching for something and found it. :)

I have this piece of code in my script at the moment...

for(local.i=1;local.i <= $player.size ;local.i++)
{
$player[local.i] holster
$player[local.i] playsound rifle_drop1
$player[local.i] takeall
$player[local.i] item weapons/silencedpistol.tik
$player[local.i] useweaponclass pistol
$player[local.i] ammo silencedpistol 0
}

Which takes all weapons and give the silenced pistol. Could you not place a trigger in the room (or wherever) and use it to take the weapons away as above and then when 'istouching' becomes false give them back? (obviously you would need to somehow record what weapons were being carried to start off with if you want to give the same weapons back).
And could you not make the trigger a 'trigger_nodamage'? Which seems to make players invulnerable when touching it.

Just an idea, although I spend all my time seeking answers not giving them. :)
Mapping is just INCREDIBLY time consuming.
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

CP had something like this in his kingtiger maps, could be worth investigating.
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
Post Reply