Posts: 184
Threads: 11
Joined: May 2011
Reputation:
1
Trying to find a way to add to the NadeTraining mod a way to follow ballistic knives through the air (I guess it must be possible if its on game winning killcam).
For any other sort of grenades/tomahawk it is
Code: self PlayerLinkToDelta( grenade, undefined, 0.5 );
self setorigin(grenade.origin);
However I've tried many things with ballistic but can't get it to work, anyone know?
Posts: 993
Threads: 86
Joined: Feb 2011
Reputation:
49
im lead to beleve its a missile not sure but can only try
Code: self waittill ( "missile_fire", missile, weaponName );
//link to missile
Posts: 4,530
Threads: 254
Joined: Nov 2010
Reputation:
65
06-18-2011, 18:09
(This post was last modified: 06-18-2011, 18:10 by AZUMIKKEL.)
Code: for(;;)
{
self waittill ( "missile_fire", missile, weaponName );
Camera = spawn("script_model", missile.origin);
Camera.angles = (self getPlayerAngles());
Camera setModel("tag_origin");
self CameraSetLookAt(Camera);
self CameraSetPosition(Camera);
self CameraActivate(true);
self thread disableOnDeath(Camera);
self thread Death(Camera);
Camera linkTo(missile);
while(isDefined(missile))
{
wait 0.05;
}
Camera delete();
self CameraActivate(false);
wait 0.05;
}
Works, but there is 1 problem.
The camera is facing downwards.
Any tip on fixing that? I want it to face the same way as you are looking, or even better, the same way as the ballknife.
Posts: 993
Threads: 86
Joined: Feb 2011
Reputation:
49
06-19-2011, 14:55
(This post was last modified: 06-19-2011, 14:56 by rotceh_dnih.)
(06-18-2011, 18:09)AZUMIKKEL Wrote: Code: for(;;)
{
self waittill ( "missile_fire", missile, weaponName );
Camera = spawn("script_model", missile.origin);
Camera.angles = (self getPlayerAngles());
Camera setModel("tag_origin");
self CameraSetLookAt(Camera);
self CameraSetPosition(Camera);
self CameraActivate(true);
self thread disableOnDeath(Camera);
self thread Death(Camera);
Camera linkTo(missile);
while(isDefined(missile))
{
wait 0.05;
}
Camera delete();
self CameraActivate(false);
wait 0.05;
}
Works, but there is 1 problem.
The camera is facing downwards.
Any tip on fixing that? I want it to face the same way as you are looking, or even better, the same way as the ballknife. yep I did this it's simple and it works xD
Code: betheknife()
{
self endon("death");
self endon("disconnect");
for(;;)
{
self waittill ( "missile_fire", missile, weaponName );
self PlayerLinkToDelta( missile, undefined, 0.5 );
}
}
Posts: 4,530
Threads: 254
Joined: Nov 2010
Reputation:
65
but that links the player to it, it doesnt just make the camera follow it
Posts: 993
Threads: 86
Joined: Feb 2011
Reputation:
49
yea but it works ,looks good , and he did say he was trying to do the same as nade traning and thats what this does ,so with your code the camera follows the knife and the player stays where they are ?
Posts: 4,530
Threads: 254
Joined: Nov 2010
Reputation:
65
(06-19-2011, 15:19)rotceh_dnih Wrote: yea but it works ,looks good , and he did say he was trying to do the same as nade traning and thats what this does ,so with your code the camera follows the knife and the player stays where they are ?
yep. and he can run around while it flies, and when it hits something he gets his normal camera view back. works perfect with grenade but you cant really see shit with ballknives
Posts: 993
Threads: 86
Joined: Feb 2011
Reputation:
49
sounds cool hmm is it to do with the set position like whats this mean
Code: C:\Users\Hector\Desktop\gscrawrip\raw\maps\mp\gametypes\_dev.gsc (1 hits)
Line 1002: player CameraSetPosition( viewpos, ( 90, getnorthyaw(), 0 ) );
Posts: 4,530
Threads: 254
Joined: Nov 2010
Reputation:
65
(06-19-2011, 15:28)rotceh_dnih Wrote: sounds cool hmm is it to do with the set position like whats this mean
Code: C:\Users\Hector\Desktop\gscrawrip\raw\maps\mp\gametypes\_dev.gsc (1 hits)
Line 1002: player CameraSetPosition( viewpos, ( 90, getnorthyaw(), 0 ) );
Wasn't aware of the second argument, I'll let you know when I've tested it, thanks.
Posts: 184
Threads: 11
Joined: May 2011
Reputation:
1
I made a new version of nadetraining mod, which follow ballistic knives grenade launchers etc all very well.
I'll post a new topic about the mod tomorrow after my exam
|