News:

Come Chat with us live! Learn how HERE!

Main Menu

Denying Equipment?

Started by Drakotsu, December 25, 2008, 09:15:04 PM

Drakotsu

Hello,
I recently played a map, although I cant remember its name.
When I tried to buy a jetpack, it said "You can not buy this item". Yes, I had enough credits and I was beyond stage 2.
Now what Im wondering is how that was possible?
IS it possible to disable certain equipment on maps?
If it is,
How?

Thanks for the help,
Drakotsu

X-20

Select any structural brush then bring up the entity window (N key) and then type this in.

Key = disabledequipment

Value = jetpack (or any other thing/class you want to disable)

And hit enter :>
Quote from: Stannum
I'm busy making muffins right now so I'll have to ban you later. >:|
Quote<joey`> mcdonalds fired me for trying to install irc on the teleprompter

Drakotsu

Wow..
At first I thought you were joking.

Thanks a lot man :D That REALLY helps!

Hendrich

Now THATS a useful feature, reminds me of that buildable layout idea awhile back. Too bad not many maps uses that feature smartly.  :-\

professor

could u use it on two walls, so that they cant fly between them? or how does it work??
http://static.flickr.com/24/141310872_e39ad59705_b.jpg
omg! someone cut the arm off my tyrant!!

Kaleo

Huh... I thought this was going to be a 1.2 feature.

Oh well. You learn something new ever day.
Quote from: Stannum
Thou canst not kill that which doth not live,
but you can blow it into chunky kibbles!
I has a cookie, and u can has a cookie, but i no givs u mai cookie...

Plague Bringer

It disables that equipment/class for the entire map. I'm quite sure you can disable buildables, too, but I'm not sure..
U R A Q T

professor

oh i wish u could do it so that they can only not use it in sertain areas...
http://static.flickr.com/24/141310872_e39ad59705_b.jpg
omg! someone cut the arm off my tyrant!!

Plague Bringer

Try a trigger brush that with a kill key and a value of jetpack, or something like that? You can have a timer, and a c(enter)p(rint) to warn players and give them a few seconds to get out without dying.
U R A Q T

professor

i just think it would be funny to have an area where jets dont work, but they can still go there, such as a ginormous stair case, but they cant fly up it XD
http://static.flickr.com/24/141310872_e39ad59705_b.jpg
omg! someone cut the arm off my tyrant!!

Drakotsu

Ohh yea..
Is there a way to disable certain alien classes?
If so, how?

Plague Bringer

Key = disabledequipment

Value = jetpack (or any other thing/class you want to disable)
U R A Q T

Plague Bringer

U R A Q T

Drakotsu

#13
I tried level4. It let me evolve to it though.
Tried tyrant..still let me evolve.

And also how would you disable multiple things on one map? with a ; or a ,?

cactusfrog

isnted of usting ; try entering that key with different brushes

X-20

That won't work, if i remember right you just use spaces.

So it would go like this in the value. - jetpack lcannon level3upg level4
Quote from: Stannum
I'm busy making muffins right now so I'll have to ban you later. >:|
Quote<joey`> mcdonalds fired me for trying to install irc on the teleprompter

Drakotsu

But when i do level4 it still lets me evolve to a tyrant  :'(


WaxyChicken

when you enter a key into a brush, doesn't it go into World Spawn?

Drakotsu

#19
Yea it does.
Although that is the method used when denying equipment.

Thanks Bissig,
Ill try class level4 and get back to you.

Edit:
I tried
key: disabledequipment
value: class level4

Did not work =[.

amz181

This is actually a really interesting thread :D I never thought of this and it could be really fun to play with.

could you have it so that it would undeny say when you get to some boxes.

Like add a trigger or something so that when a human reaches some boxes it undeny some weaps...?

Drakotsu

Im not sure but I am pretty sure that it would allow the weaps for everyone, not just for one hummie :o

Undeference

disabledEquipment is for weapons and upgrades
disabledBuildables is for buildables
disabledClasses if for classes
Need help? Ask intelligently. Please share solutions you find.

Quote from: tuple on February 15, 2008, 11:54:10 PMThats what we need, helpful players, not more powerful admins.

amz181

Quote from: Drakotsu on December 27, 2008, 11:45:53 PM
Im not sure but I am pretty sure that it would allow the weaps for everyone, not just for one hummie :o

thats what i want, like the humans find there supplies so they can now use armour. It would add a new twist to the map and hopefully make it more fun  ?

Drakotsu

Ohh thats a nice idea amz :)

Thanks so much undeference, ill try those! :D

==Troy==

just beware that disabling buildables has a bug which is fixed in svn and latest lakitu, but for the rest of the older qvms, the disabledbuildables use classes instead of buildable names.

To clarify. Each buildables has a number 0 .. whatever the number of buildables is. Same thing for classes. So when you disable buildable, it searches through classes for matching name, and disables that number (but disables the buildable). (i.e. entering mgturret will not take effect, entering level0 will take effect but will disable some buildable which has the same number in structure as the dretch in its own structure)

professor

could u repeat that again, but SLOWER?  ;D
http://static.flickr.com/24/141310872_e39ad59705_b.jpg
omg! someone cut the arm off my tyrant!!

Plague Bringer

You know how for aliens, they can be called two different things? Dretch, or level0? Basilisk, or level1? Well, it is the same way with buildables. When mapping, instead of putting "mgturret" as a value, you would have to put the corresponding level. For example, level0. Say that the telenode corresponds with level2? Rather than "node", you would have to use "level2" as a value. Now, with all that being said, I don't know which buildings correspond with which level values.

Got it?
U R A Q T

==Troy==

#28
right, I dag out the structures which correspond to the buildables and classes. The FIRST in the structure is number one, and so on.


buildableAttributes_t bg_buildableList[ ] =
{
 {
   BA_A_SPAWN,            //int       buildNum;
   "eggpod",              //char      *buildName;
   "Egg",                 //char      *humanName;
   "team_alien_spawn",    //char      *entityName;
   
 },
 {
   BA_A_BARRICADE,        //int       buildNum;
   "barricade",           //char      *buildName;
   "Barricade",           //char      *humanName;
   "team_alien_barricade",//char      *entityName;
 
 },
 {
   BA_A_BOOSTER,          //int       buildNum;
   "booster",             //char      *buildName;
   "Booster",             //char      *humanName;
   "team_alien_booster",  //char      *entityName;
 
 },
 {
   BA_A_ACIDTUBE,         //int       buildNum;
   "acid_tube",           //char      *buildName;
   "Acid Tube",           //char      *humanName;
   "team_alien_acid_tube",//char      *entityName;
 
 },
 {
   BA_A_HIVE,             //int       buildNum;
   "hive",                //char      *buildName;
   "Hive",                //char      *humanName;
   "team_alien_hive",     //char      *entityName;
 
 },
 {
   BA_A_TRAPPER,          //int       buildNum;
   "trapper",             //char      *buildName;
   "Trapper",             //char      *humanName;
   "team_alien_trapper",  //char      *entityName;
 
 },
 {
   BA_A_OVERMIND,         //int       buildNum;
   "overmind",            //char      *buildName;
   "Overmind",            //char      *humanName;
   "team_alien_overmind", //char      *entityName;
   
 },
 {
   BA_A_HOVEL,            //int       buildNum;
   "hovel",               //char      *buildName;
   "Hovel",               //char      *humanName;
   "team_alien_hovel",    //char      *entityName;
   
 },
 {
   BA_H_SPAWN,            //int       buildNum;
   "telenode",            //char      *buildName;
   "Telenode",            //char      *humanName;
   "team_human_spawn",    //char      *entityName;
   
 },
 {

   BA_H_MEDISTAT,         //int       buildNum;
   "medistat",            //char      *buildName;
   "Medistation",         //char      *humanName;
   "team_human_medistat", //char      *entityName;
 
 },
 {
   BA_H_MGTURRET,         //int       buildNum;
   "mgturret",            //char      *buildName;
   "Machinegun Turret",   //char      *humanName;
   "team_human_mgturret", //char      *entityName;
 
 },
 {
   BA_H_TESLAGEN,         //int       buildNum;
   "tesla",               //char      *buildName;
   "Tesla Generator",     //char      *humanName;
   "team_human_tesla",    //char      *entityName;
 
 },
 {
   BA_H_DCC,              //int       buildNum;
   "dcc",                 //char      *buildName;
   "Defence Computer",    //char      *humanName;
   "team_human_dcc",      //char      *entityName;
 
 },
 {
   BA_H_ARMOURY,          //int       buildNum;
   "arm",                 //char      *buildName;
   "Armoury",             //char      *humanName;
   "team_human_armoury",  //char      *entityName;
   
 },
 {
   BA_H_REACTOR,          //int       buildNum;
   "reactor",             //char      *buildName;
   "Reactor",             //char      *humanName;
   "team_human_reactor",  //char      *entityName;
   { "models/buildables/reactor/reactor.md3", 0, 0, 0 },
   1.0f,                  //float     modelScale;
 
 },
 {
   BA_H_REPEATER,         //int       buildNum;
   "repeater",            //char      *buildName;
   "Repeater",            //char      *humanName;
   "team_human_repeater", //char      *entityName;
 
 }
};



and alien classes


classAttributes_t bg_classList[ ] =
{
 {
   PCL_NONE,                                       //int     classnum;
   "spectator",                                    //char    *className;
   "Spectator",                                    //char    *humanName;
 
 },
 {
   PCL_ALIEN_BUILDER0,                             //int     classnum;
   "builder",                                      //char    *className;
   "Builder",                                      //char    *humanName;
   "builder",                                      //char    *modelname;
 
 },
 {
   PCL_ALIEN_BUILDER0_UPG,                         //int     classnum;
   "builderupg",                                   //char    *classname;
   "Advanced Builder",                             //char    *humanname;
   "builder",                                      //char    *modelname;
   1.0f,                                           //float   modelScale;

 },
 {
   PCL_ALIEN_LEVEL0,                               //int     classnum;
   "level0",                                       //char    *classname;
   "Soldier",                                      //char    *humanname;
   "jumper",                                       //char    *modelname;
   0.2f,                                           //float   modelScale;
 
 },
 {
   PCL_ALIEN_LEVEL1,                               //int     classnum;
   "level1",                                       //char    *classname;
   "Hydra",                                        //char    *humanname;
   "spitter",                                      //char    *modelname;
   0.6f,                                           //float   modelScale;
 
 },
 {
   PCL_ALIEN_LEVEL1_UPG,                           //int     classnum;
   "level1upg",                                    //char    *classname;
   "Hydra Upgrade",                                //char    *humanname;
   "spitter",                                      //char    *modelname;
   0.7f,                                           //float   modelScale;
   "blue",                                         //char    *skinname;
 
 },
 {
   PCL_ALIEN_LEVEL2,                               //int     classnum;
   "level2",                                       //char    *classname;
   "Chimera",                                      //char    *humanname;
   "tarantula",                                    //char    *modelname;
   0.75f,                                          //float   modelScale;
   "default",                                      //char    *skinname;
   1.0f,                                           //float   shadowScale;

 },
 {
   PCL_ALIEN_LEVEL2_UPG,                           //int     classnum;
   "level2upg",                                    //char    *classname;
   "Chimera Upgrade",                              //char    *humanname;
   "tarantula",                                    //char    *modelname;
   0.9f,                                           //float   modelScale;
   "red",                                          //char    *skinname;
 
 },
 {
   PCL_ALIEN_LEVEL3,                               //int     classnum;
   "level3",                                       //char    *classname;
   "Dragoon",                                      //char    *humanname;
   "prowl",                                        //char    *modelname;
   1.0f,                                           //float   modelScale;
   "default",                                      //char    *skinname;
   1.0f,                                           //float   shadowScale;
 
 },
 {
   PCL_ALIEN_LEVEL3_UPG,                           //int     classnum;
   "level3upg",                                    //char    *classname;
   "Dragoon Upgrade",                              //char    *humanname;
   "prowl",                                        //char    *modelname;
   1.0f,                                           //float   modelScale;
   "default",                                      //char    *skinname;
 
 },
 {
   PCL_ALIEN_LEVEL4,                               //int     classnum;
   "level4",                                       //char    *classname;
   "Big Mofo",                                     //char    *humanname;
   "mofo",                                         //char    *modelname;
   1.0f,                                           //float   modelScale;
   "default",                                      //char    *skinname;
 
 },
 {
   PCL_HUMAN,                                      //int     classnum;
   "human_base",                                   //char    *classname;
   "Human",                                        //char    *humanname;
   "sarge",                                        //char    *modelname;
   1.0f,                                           //float   modelScale;
 
 },
 {
   PCL_HUMAN_BSUIT,                                //int     classnum;
   "human_bsuit",                                  //char    *classname;
   "bsuit",                                        //char    *humanname;
   "keel",                                         //char    *modelname;
   1.0f,                                           //float   modelScale;
   "default",                                      //char    *skinname;
 
 },
};


So this means, to disable eggs for aliens, you have to have disabledbuildables : value = spectator. since spectator is the first class in class structure, and eggpod is the first buildable in the buildable structure.

As you can see you actually cannot disable some of the buildables since there arent enough classes.

and again. Lakitu qvm since 5.4 (iirc) and main svn has this issue fixed, so you actually can use mgturret to disable turrets, and dont have to dig out corresponding alien class that will disable that buildable.

Undeference

Do not use class names for buildables to get around an old bug. Any game.qvm based on revision 1102 or newer does not have this bug.

==Troy== seems to be saying the order of the array in his snippet is significant. It is not.
Plague Bringer seems to be saying that multiple different class names can be used to refer to the same class. In ==Troy=='s code snippet, only the buildName or classname can be used‒the same thing you would use in binds.
Need help? Ask intelligently. Please share solutions you find.

Quote from: tuple on February 15, 2008, 11:54:10 PMThats what we need, helpful players, not more powerful admins.