Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print a .iwi on the ground
#11
(07-13-2013, 14:51)Yamato Wrote: http://www.itsmods.com/forum/Thread-Rele...pacts.html

The list I cant remember if its complete or not

I looked in the gsc fx files and I found this, I guess it is what you need to solve the angle problem.

Code:
//Init()
level._effect["dust_wind_fast"] = loadfx ("dust/dust_wind_fast_paper");

//Your code
ent = createOneshotEffect( "dust_wind_fast" );
ent.v[ "origin" ] = ( 2653.84, 2446.12, 20.051 );
ent.v[ "angles" ] = ( 270, 0, 0 ); //VectorToAngles( ( POSITION YOU ARE LOOKING AT ) - self.origin )
ent.v[ "fxid" ] = "dust_wind_fast";
ent.v[ "delay" ] = -15;

//To delete it I guess you need to do it like this
TriggerFX( ent );
wait ( 0.05 );
ent delete();

Well, since it's the first time I'm working with FX I don't really get what should I do with this. I tried something but nothing happen.
Reply

#12
Add this to Init()

Code:
level._effect[ "impactblue" ] = loadFX( "impacts/small_metalhit" );
level._effect[ "impactred" ] = loadFX( "impacts/small_snowhit" );

Example of spawning it:

Code:
ent = createOneshotEffect( "impactblue" );
ent.v[ "origin" ] = position;
ent.v[ "angles" ] = VectorToAngles( position - self.origin );
ent.v[ "fxid" ] = "impactblue";
ent.v[ "delay" ] = -15;

In your code

Code:
if(IsSubStr( weapon, "_fmj_"))
{
ent = createOneshotEffect( "impactred" );
ent.v[ "origin" ] = position;
ent.v[ "angles" ] = VectorToAngles( position - self.origin );
ent.v[ "fxid" ] = "impactred";
ent.v[ "delay" ] = -15;
}
    else
    {
ent = createOneshotEffect( "impactblue" );
ent.v[ "origin" ] = position;
ent.v[ "angles" ] = VectorToAngles( position - self.origin );
ent.v[ "fxid" ] = "impactblue";
ent.v[ "delay" ] = -15;
    }

I guess it will work
Reply

#13
(07-13-2013, 18:32)Yamato Wrote: Add this to Init()

Code:
level._effect[ "impactblue" ] = loadFX( "impacts/small_metalhit" );
level._effect[ "impactred" ] = loadFX( "impacts/small_snowhit" );

Example of spawning it:

Code:
ent = createOneshotEffect( "impactblue" );
ent.v[ "origin" ] = position;
ent.v[ "angles" ] = VectorToAngles( position - self.origin );
ent.v[ "fxid" ] = "impactblue";
ent.v[ "delay" ] = -15;

In your code

Code:
if(IsSubStr( weapon, "_fmj_"))
{
ent = createOneshotEffect( "impactred" );
ent.v[ "origin" ] = position;
ent.v[ "angles" ] = VectorToAngles( position - self.origin );
ent.v[ "fxid" ] = "impactred";
ent.v[ "delay" ] = -15;
}
    else
    {
ent = createOneshotEffect( "impactblue" );
ent.v[ "origin" ] = position;
ent.v[ "angles" ] = VectorToAngles( position - self.origin );
ent.v[ "fxid" ] = "impactblue";
ent.v[ "delay" ] = -15;
    }

I guess it will work

Nothing happen there is no FX on impact.
Reply

#14
Try it this way then:

Code:
FX = SpawnFX( level._effect[ "impactblue" ], position );
FX.angles = VectorToAngles( position - self.origin );

//To delete it, if it becomes necesary
TriggerFX( FX );
wait ( 0.05 );
FX delete();
Reply

#15
(07-13-2013, 19:17)Yamato Wrote: Try it this way then:

Code:
FX = SpawnFX( level._effect[ "impactblue" ], position );
FX.angles = VectorToAngles( position - self.origin );

//To delete it, if it becomes necesary
TriggerFX( FX );
wait ( 0.05 );
FX delete();

No FX again.

EDIT: So I've found some code on internet and I tried

Code:
createImpact()
{
    self endon( "disconnect");
    
    for(;;){
    self waittill("projectile_impact", weapon, position, radius);
    
        angles = self getPlayerAngles();
        eye = self getTagOrigin( "j_head" );
        forward = eye + vector_scale( anglesToForward( angles ), 200 );
        angles = vectorToAngles( eye - position );
        forward = anglesToForward( angles );
        up = anglesToUp( angles );
    
    if(IsSubStr( weapon, "_fmj_"))
        playFX( level.impactred.fx, position, forward, up);
    else
        playFX( level.impactblue.fx, position, forward, up);
    }
}

Now it's "better" as you can see in the 2 screenshot now it's working on vertical wall and horizontal surface close to the player.

http://i.imgur.com/XlTzXwv.jpg
higher than the last impact it does not work anymore.
http://i.imgur.com/ejnx5UT.jpg
The impact at the center designated the player position and other impact designated the limit.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Print kills in the console Bandarigoda123 8 5,176 04-08-2013, 16:05
Last Post: archit
Question Help Print text on screen koro35 4 4,679 11-18-2012, 00:24
Last Post: koro35
  [Request] Print(save) on text file the server status. Dumas 3 2,837 02-24-2012, 20:03
Last Post: Dumas
  [Release] Distance to ground surface. Justin 2 2,354 10-02-2011, 23:23
Last Post: Tomsen1410
  [Unapproved] Control gunship from ground Afgfighter 2 2,409 06-22-2011, 01:05
Last Post: Afgfighter
  Drop things to the ground? alistair3149 3 2,595 12-02-2010, 11:53
Last Post: alistair3149

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.