minigames / teambattle
Moderator: Core Staff
minigames / teambattle
Okay, so over the last week I've been making a basic, simple minigame map. Here is a teaser of 3/10 games I have so far.
Run to the thing, only 1 PERSON gets teleported into the selection room. He chooses the games. The seperate teams are taken to their spots in that particular minigame.
Race, first person to the finish gets to kill the entire team, who are transported to the "chicken box" as I like to call it.
Basically, the map is pretty much finished game wise, I've still got one more game to do to make it 10 minigames. This is aimed at the promod community, as its a teambattle really, not minigames, but minigames just catches your attention.
I do need help though, theres still a vital part of the scripting which needs to be done.
WEAPONS
This is what I need.
I want to see if its possible to run it entirely on promod, but with no mod changes (although I doubt this)
So is it possible to take away all players weapons when they spawn?
Then, when they teleport to the minigame, I need to assign them weapons. Not teamweapons, just overall. I need to get a array of all players, then assign them weapons and ammo, but I'm unsure of how to script this. To all you CJ gods out there, this one is for you.
Also, a interesting thing would be if you could disable knife as well, so the players could be in the same room, but couldn't do anything to each other, this would help future maps from being less complicated, and better made.
Contact me at xf=uaced
Or here
Run to the thing, only 1 PERSON gets teleported into the selection room. He chooses the games. The seperate teams are taken to their spots in that particular minigame.
Race, first person to the finish gets to kill the entire team, who are transported to the "chicken box" as I like to call it.
Basically, the map is pretty much finished game wise, I've still got one more game to do to make it 10 minigames. This is aimed at the promod community, as its a teambattle really, not minigames, but minigames just catches your attention.
I do need help though, theres still a vital part of the scripting which needs to be done.
WEAPONS
This is what I need.
I want to see if its possible to run it entirely on promod, but with no mod changes (although I doubt this)
So is it possible to take away all players weapons when they spawn?
Then, when they teleport to the minigame, I need to assign them weapons. Not teamweapons, just overall. I need to get a array of all players, then assign them weapons and ammo, but I'm unsure of how to script this. To all you CJ gods out there, this one is for you.
Also, a interesting thing would be if you could disable knife as well, so the players could be in the same room, but couldn't do anything to each other, this would help future maps from being less complicated, and better made.
Contact me at xf=uaced
Or here
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: minigames / teambattle
place a trigger under the spawn and when triggered removed guns.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: minigames / teambattle
Code: Select all
main()
{
disableweap = getentarray( "removeweapons", "targetname" );
if(isdefined(disableweap))
{
for( i = 0; i < disableweap.size; i++ )
disableweap[i] thread disable();
}
}
disable()
{
while(true)
{
self waittill( "trigger", player );
players = getEntArray("player", "classname");
for(i=0;i<players.size;i++)
players[i] takeallweapons();
}
}
This leaves me unable to knife, same situation with disableweapons()
I tried using allowmelee( "true"), I get a error.
Perhaps if I give myself hands like on the codjumper mod, I'll be able to knife?
Code: Select all
<player> getviewmodel() //(edit: viewmodel_hands_new)
Code: Select all
players[i] getviewmodel( "viewmodel_hands_new")
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: minigames / teambattle
The hands in CoD 4 are not hands, it is a weapon (C4).
The player probably needs a weapon in his hands before melee works.
TakeAllWeapons
GiveWeapon
SetWeaponAmmoClip
SetWeaponAmmoStock
The player probably needs a weapon in his hands before melee works.
TakeAllWeapons
GiveWeapon
SetWeaponAmmoClip
SetWeaponAmmoStock
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: minigames / teambattle
Code: Select all
main()
{
disableweap = getentarray( "removeweapons", "targetname" );
if(isdefined(disableweap))
{
for( i = 0; i < disableweap.size; i++ )
disableweap[i] thread disable();
}
}
disable()
{
while(true)
{
self waittill( "trigger", player );
players = getEntArray("player", "classname");
for(i=0;i<players.size;i++)
players[i] takeallweapons();
players[i] GiveWeapon ( "deserteagle_mp" );
players[i] setweaponammoclip ( "deserteagle_mp", 0 );
players[i] setweaponammostock ( "deserteagle_mp", 0 );
}
}
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: minigames / teambattle
players = getEntArray("player", "classname");
for(i=0;i<players.size;i++)
Remove that. You do not need a player array, the players are detected by the trigger.
for(i=0;i<players.size;i++)
Remove that. You do not need a player array, the players are detected by the trigger.
Code: Select all
  while(true)
  {
   self waittill( "trigger", player );
   player takeallweapons();
   player GiveWeapon ( "deserteagle_mp" );
   player SwitchToWeapon ( "deserteagle_mp" );
   player setweaponammoclip ( "deserteagle_mp", 0 );
   player setweaponammostock ( "deserteagle_mp", 0 );
  }
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 0 guests