Posts: 30
Threads: 13
Joined: May 2013
Reputation:
1
I'm new to scripting in GSC. I'm mostly 'self-taught'
I'm trying to figure out how to spawn a flying rocket, say, Stinger_mp from a player-held weapon. I'm unable to get it to spawn, but I know how to spawn FX (Kinda). Is this even possible?
Posts: 1,741
Threads: 93
Joined: Mar 2012
Reputation:
26
Oh I read it wrong I thought it said putting the stinger in his fov or something lol
Do not take life too seriously. You will never get out of it alive.
Posts: 30
Threads: 13
Joined: May 2013
Reputation:
1
06-02-2013, 21:18
(This post was last modified: 06-02-2013, 21:31 by akillj.)
Thanks guys, but what would that look like as an actual function? I ask because when I look in files from other mods, they all just spawn effects on the weapon, using something like this:
start = self getTagOrigin( "tag_eye" );
end = self getTagOrigin( "tag_eye" ) + vecscale( anglestoforward( self getPlayerAngles() ), 100000 );
trace = bulletTrace( start, end, true, self );
thread doLaserFX( self getTagOrigin( "tag_eye" ), anglestoforward( self getPlayerAngles() ), trace["position"] );
I'm trying to do something like, when the player fires an M9, it launches a stinger_mp missile every time.
Sorry guys, I just read that link that was posted on MagicBullet's. I put a line of code that looks like
MagicBullet( "rpg_mp", self.origin, self.origin+(0,0,500), self );
RadiusDamage( self.origin , 400, 150, 100, self);
SetPlayerIgnoreRadiusDamage( true );
and it works, but how to I get it to follow my crosshair and fire there? It just fires straight up lol