Jump to content
Come try out the Arcade, Link at the top of the website ×

Recommended Posts


  • Member ID:  42
  • Group:  *** Clan Members
  • Followers:  50
  • Topic Count:  338
  • Topics Per Day:  0.06
  • Content Count:  8389
  • Content Per Day:  1.45
  • Reputation:   6126
  • Achievement Points:  54469
  • Solved Content:  0
  • Days Won:  13
  • Joined:  09/01/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  01/30/1959
  • Device:  Windows

Posted

Hey Dawgy or anybody else who knows this better then me. I'm trying to run a script this one to be exact

 

}


tribute_enter()
{
  enter1 = getentarray ("tribute_enter","targetname");
  if ( isdefined(enter1) )
    for (i = 0; i < enter1.size; i++)
    enter1 thread tribute_enter_act();
}

tribute_enter_act()
{
  while (1)
  {
    self waittill ("trigger", player);
    player disableWeapon();
  }
}

tribute_exit()
{
  exit1 = getentarray ("tribute_exit","targetname");
  if ( isdefined(exit1) )
    for (i = 0; i < exit1.size; i++)
    exit1 thread tribute_exit_act();
}

tribute_exit_act()
{
  while (1)
  {
    self waittill ("trigger", player);
    player enableWeapon();
  }
}

 

I am running it on a waw map my problem is I can't sem to figure out what type of trigger to use. what i'm trying to do is have the weapons become inactive  when you enter the room and become active when you leave it. Any help would be sweeet thanks .



  • Member ID:  2068
  • Group:  +++ COD5 Head Admin
  • Followers:  71
  • Topic Count:  1140
  • Topics Per Day:  0.21
  • Content Count:  8606
  • Content Per Day:  1.62
  • Reputation:   7575
  • Achievement Points:  76856
  • Solved Content:  0
  • Days Won:  67
  • Joined:  12/25/10
  • Status:  Offline
  • Last Seen:  
  • Birthday:  05/23/1973
  • Device:  Windows

Posted

I don't know anything about map making but can a trigger be a specific XYZ plane in the map like a doorway?  Like I said, don't know, just thought I throw that out there.



  • Member ID:  42
  • Group:  *** Clan Members
  • Followers:  50
  • Topic Count:  338
  • Topics Per Day:  0.06
  • Content Count:  8389
  • Content Per Day:  1.45
  • Reputation:   6126
  • Achievement Points:  54469
  • Solved Content:  0
  • Days Won:  13
  • Joined:  09/01/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  01/30/1959
  • Device:  Windows

Posted

Yea a trigger can be made into just about any shape. for this to work it would be 2 triggers one in a room and one on your way out . My problem is there are 5 or 6 different types of triggers damage , chain , AI , so on



  • Member ID:  1540
  • Group:  **- Inactive Registered Users
  • Followers:  13
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  856
  • Content Per Day:  0.16
  • Reputation:   100
  • Achievement Points:  4812
  • Solved Content:  0
  • Days Won:  0
  • Joined:  06/28/10
  • Status:  Offline
  • Last Seen:  
  • Birthday:  09/20/1969

Posted

I dont know if this code would be of any use just something I seen but lost the page looking for a better example.

 

Also it looks like a volume trigger may work best, then you can just call isTouching

 

init(){ // handle disabled weapon check variable level thread onPlayerConnect(); level thread setupTrigger();}onPlayerConnect(){ while(1) { level waittill( "connected", player ); player thread onDeath(); player.weaponsDisabled = false; }}onDeath(){ self endon( "disconnect" ); while(1) { self waittill( "death" ); self.weaponsDisabled = false; }}setupTrigger(){ weapon_disable = getEnt( "weap_disable", "targetname" ); while(1) { weapon_disable waittill( "trigger", player ); if( player.pers["team"] == "allies" && !player.weaponsDisabled ) { player.weaponsDisabled = true; player thread disablePlayerWeapons( weapon_disable ); } }}disablePlayerWeapons( trigger ){ self endon( "disconnect" ); self endon( "death" ); self endon( "joined_spectator" ); self endon( "left_weapon_trigger" ); self iPrintLnBold( "Weapons disabled" ); self disableWeapons(); while(1) { if( !self isTouching( trigger ) ) { self iPrintLnBold( "Weapons enabled" ); self enableWeapons(); self.weaponsDisabled = false; self notify( "left_weapon_trigger" ); } wait 0.05; }}



  • Member ID:  2068
  • Group:  +++ COD5 Head Admin
  • Followers:  71
  • Topic Count:  1140
  • Topics Per Day:  0.21
  • Content Count:  8606
  • Content Per Day:  1.62
  • Reputation:   7575
  • Achievement Points:  76856
  • Solved Content:  0
  • Days Won:  67
  • Joined:  12/25/10
  • Status:  Offline
  • Last Seen:  
  • Birthday:  05/23/1973
  • Device:  Windows

Posted

I think Nutcutter may be on the right track.

For trigger type, can you use multiple and use the isTouching function so when the player is touching the space or room that is enclosed by the trigger, weapons will be disabled?


  • 3 months later...

  • Member ID:  179
  • Group:  *** Clan Members
  • Followers:  27
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  1055
  • Content Per Day:  0.18
  • Reputation:   373
  • Achievement Points:  6829
  • Solved Content:  0
  • Days Won:  1
  • Joined:  09/02/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  12/07/1981
  • Device:  iPhone

Posted

Did u finger this out yet labob? Somehow I missed this thread...i did something like this for a bash room in one of my maps I could get them to loose all there ammo and nades by using trigger multiple over the entry.. Although the only way I could give it back was a trigger use/touch after leaving the room..

Awards


  • Member ID:  179
  • Group:  *** Clan Members
  • Followers:  27
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  1055
  • Content Per Day:  0.18
  • Reputation:   373
  • Achievement Points:  6829
  • Solved Content:  0
  • Days Won:  1
  • Joined:  09/02/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  12/07/1981
  • Device:  iPhone

Posted

Oh and trigger multiples reset themselves... Like teleports...work every time

Awards


  • Member ID:  179
  • Group:  *** Clan Members
  • Followers:  27
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  1055
  • Content Per Day:  0.18
  • Reputation:   373
  • Achievement Points:  6829
  • Solved Content:  0
  • Days Won:  1
  • Joined:  09/02/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  12/07/1981
  • Device:  iPhone

Posted

?#$%(??

Awards

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.