sinkoman
Party Escort Bot
- Joined
- Dec 2, 2004
- Messages
- 7,457
- Reaction score
- 21
Ok guys, i've figured out how to make it so that you can controll the canisters in Garrys mod. It's much like doing it in JBmod, so if you know how to do it in that, then you're all set.
For the rest of you, here we go!
Spawn four cannisters in triangle on anymap.
Aim at the first cannister.
Now go into the console and type this
Now what this does is it sets the name of the cannister you were aiming at to bob.
Now go into the console and type this
Now leave the console. You'll see that the cannister you named bob is now active! GOODY!
How does this work? Ent_fire is the general command for doing stuff with entities. You type ent_fire <entity name> <action>
So to turn bob off you would type
And he would deactivate!
How do you controll stuff with this? I'll show you how!
Go back to the console and type this
What you just did was create two aliases named +bob and -bob to make a shortcut for activating stuff. The pluses will be important later but for now, all you need to know is that instead of typing "ent_fire bob activate" now all you need to type is "+bob".
Go back into the console and type this
What this does is it makes the i key do +bob. +bob is "ent_fire bob activate". The plus infront of the alias tells the game to do +bob when i is pressed down, and -bob when i is unpressed. Get it?
How can you controll stuff like this you might be asking? Well say you want to controll the boat you just mades left and right movements. Make a cannister on the right side and do the whole +bob thing to it, and make a cannister on the left and do the +bob thing again only with a different alias and entity name and a different key press. Now when you want your boat to turn right, you press the key for +bob/+somename and when you want to go left press the key for +someothername!
I'll try to answer questions when I get home from school.
Oh and mod's, sticky?
For the rest of you, here we go!
Spawn four cannisters in triangle on anymap.
Aim at the first cannister.
Now go into the console and type this
Code:
ent_setname bob
Now what this does is it sets the name of the cannister you were aiming at to bob.
Now go into the console and type this
Code:
ent_fire bob activate
Now leave the console. You'll see that the cannister you named bob is now active! GOODY!
How does this work? Ent_fire is the general command for doing stuff with entities. You type ent_fire <entity name> <action>
So to turn bob off you would type
Code:
ent_fire bob deactivate
And he would deactivate!
How do you controll stuff with this? I'll show you how!
Go back to the console and type this
Code:
alias +bob "ent_fire bob activate";alias -bob "ent_fire bob deactivate"
What you just did was create two aliases named +bob and -bob to make a shortcut for activating stuff. The pluses will be important later but for now, all you need to know is that instead of typing "ent_fire bob activate" now all you need to type is "+bob".
Go back into the console and type this
Code:
bind i "+bob"
What this does is it makes the i key do +bob. +bob is "ent_fire bob activate". The plus infront of the alias tells the game to do +bob when i is pressed down, and -bob when i is unpressed. Get it?
How can you controll stuff like this you might be asking? Well say you want to controll the boat you just mades left and right movements. Make a cannister on the right side and do the whole +bob thing to it, and make a cannister on the left and do the +bob thing again only with a different alias and entity name and a different key press. Now when you want your boat to turn right, you press the key for +bob/+somename and when you want to go left press the key for +someothername!
I'll try to answer questions when I get home from school.
Oh and mod's, sticky?