02-01-2012, 17:54
02-01-2012, 18:06
You should really learn some basic gsc before you start with the 'harder' stuff, like making turrets. There are plenty of tutorials in the tutorial section, I suggest you read them.
02-01-2012, 18:14
(02-01-2012, 17:54)GscGunner Wrote: [ -> ]but when i do player.origin. i get a error
player undefined or something
or ist hat cuz im playing with bots lol?
*sigh*
http://wiki.modsrepository.com/index.php...troduction
02-01-2012, 18:44
I KNOW THE BASICS. damn
i just want to know what i need to replace the self.origin with what...
damn, cant somebody just give it me -.-
wow, rendflex thnx for that link
somethings i didn't know y et or didnt totally understand are in there, didnt found .origin yet or that kind of stuff
i just want to know what i need to replace the self.origin with what...
damn, cant somebody just give it me -.-
wow, rendflex thnx for that link
somethings i didn't know y et or didnt totally understand are in there, didnt found .origin yet or that kind of stuff
02-01-2012, 18:55
(02-01-2012, 18:44)GscGunner Wrote: [ -> ]I KNOW THE BASICS. damn
i just want to know what i need to replace the self.origin with what...
damn, cant somebody just give it me -.-
wow, rendflex thnx for that link
somethings i didn't know y et or didnt totally understand are in there, didnt found .origin yet or that kind of stuff
Well, you should certainly learn more of the "basics"
The .origin is a location, just as coordinates.
(-5135, 1351, 1238) is a origin, you could make the turret fire at that position if you put that instead of zombi.origin.
But there's a function in-game which checks the current position of something, by adding ".origin" to it.
02-01-2012, 19:02
yes, im still noob at gsc. but thats why i am here and ask questions, cuz i want to do this stuff later, next year i will be on that 'study thing'....
first: thnx for help, reply
i will first give the code i have now
- the player.origin gives error,
- self.origin, obviously shoots me
- dont know anymore things to call on .origin
- - - i dont want to let it shoot a coordinate
some more explanations about "player" cuz sometimes error (like now) sometimes not
maybe add each other, so it will be faster solved
first: thnx for help, reply
i will first give the code i have now
Code:
turrets()
{
self notifyOnPlayerCommand("3", "+actionslot 3");
self waittill("3");
Turret = spawnTurret( "misc_turret", self.origin, "pavelow_minigun_mp" );
Turret setModel( "sentry_minigun" );
Turret LaserOn();
//Turret SetTurretMinimapVisible( true )
//Turret makeTurretInoperable();
//Turret ShootTurret();
Turret SetMode( "auto_nonai" );
Turret SetRightArc(360);
Turret SetLeftArc(360);
Turret SetTopArc(360);
while(1)
{
wait 0.05;
MagicBullet("famas_mp", turret.origin, self.origin, self);
//MagicBullet("stinger_mp",turret.origin,player.origin+anglestoforward(turret.angles)*350-(0,0,10)-(0,0,randomInt(200)),self);
}
}
- the player.origin gives error,
- self.origin, obviously shoots me
- dont know anymore things to call on .origin
- - - i dont want to let it shoot a coordinate
some more explanations about "player" cuz sometimes error (like now) sometimes not
maybe add each other, so it will be faster solved
02-02-2012, 08:55
(02-01-2012, 19:02)GscGunner Wrote: [ -> ]- the player.origin gives error,
- self.origin, obviously shoots me
- dont know anymore things to call on .origin
- - - i dont want to let it shoot a coordinate
some more explanations about "player" cuz sometimes error (like now) sometimes not
maybe add each other, so it will be faster solved
.origin of something gets the coordinate where the thing/player is standing...
"player" obviously doesn't work since "player" isn't defined.
Just self, and the turret is defined right now.
There's a function in MW2, called "foreach", it takes everything from something, and does it.
So eh
Code:
foreach(player in level.players)
{
player iprintlnbold("Test");
}
will get all players, level.players is a array (a list) of all the players on the server.
Take a look at the turret in mine and Yamato's mod "chaotic invasion 2" :p
02-02-2012, 15:32
thank you very much about the info of "player"
i will look in tot that mod, i looking in it right now
i will look in tot that mod, i looking in it right now
02-02-2012, 16:03
(02-02-2012, 15:32)GscGunner Wrote: [ -> ]thank you very much about the info of "player"
i will look in tot that mod, i looking in it right now
Great
That was both mine and Yamato's first "serious" mod
So I'm sure you'll learn much from there, we had to go through most original game files to find stuffs, @Yamato hadn't made his tutorials yet lol
02-02-2012, 16:04
(02-02-2012, 16:03)Rendflex Wrote: [ -> ](02-02-2012, 15:32)GscGunner Wrote: [ -> ]thank you very much about the info of "player"
i will look in tot that mod, i looking in it right now
Great
That was both mine and Yamato's first "serious" mod
So I'm sure you'll learn much from there, we had to go through most original game files to find stuffs, @Yamato hadn't made his tutorials yet lol
My tutorials of what?