Jump to content

Set_Fire_Weapon & Related Q's


Go to solution Solved by IrocJeff,

Recommended Posts

I'm at the point now where my script comes to the execution of some prisoners. And, I'm also really lost on how to even go about this. I'm assuming that the set_fire_weapon can be set up with wait times and trues & falses.

 

set_fire_weapon true

wait 1500

set_fire_weapon false 

 

And something similar to that will give the effect of different trigger pull times, depending on the wait times.

 

My other dilemma is how does my npc know who to fire on? How would I set the script up to know who to fire at?

 

 

Or, is it possible to set up an NPC where the torso can rotate so many degrees back and forth? Similar to how they used to mow down people in old gangster movies with the tommy gun? If this way is doable? 

 

 

Link to comment

I'm pretty sure you define a target for the NPC through the script in a similar way as when an NPC looks at another NPC:

affect ( "Anders", /*@AFFECT_TYPE*/ FLUSH )
{
    set ( /*@SET_TYPES*/ "SET_LOOK_TARGET", "Castle" );
}

Though what the actual command is still eludes me.

Link to comment
  • Solution

Well, I figured out it out. Sort of. I wasn't able to get the Stormtrooper to fire on specific targets or points, but I did manage to do what I really wanted. Mow people down!! Here's the script.

 

 
affect ( "trooper1", /*@AFFECT_TYPE*/ FLUSH )
{
 
task ( "attack1" )
{
set ( /*@SET_TYPES*/ "SET_DYAW", 160.000 );
set ( /*@SET_TYPES*/ "SET_YAWSPEED", -10 );
set ( /*@SET_TYPES*/ "SET_ALT_FIRE", /*@BOOL_TYPES*/ "true" );
set ( /*@SET_TYPES*/ "SET_FIRE_WEAPON", /*@BOOL_TYPES*/ "true" );
}
 
 
task ( "attack2" )
{
set ( /*@SET_TYPES*/ "SET_DYAW", 200.000 );
set ( /*@SET_TYPES*/ "SET_YAWSPEED", -10 );
set ( /*@SET_TYPES*/ "SET_ALT_FIRE", /*@BOOL_TYPES*/ "true" );
set ( /*@SET_TYPES*/ "SET_FIRE_WEAPON", /*@BOOL_TYPES*/ "true" );
}
 
 
task ( "stop" )
{
set ( /*@SET_TYPES*/ "SET_FIRE_WEAPON", /*@BOOL_TYPES*/ "false" );
}
 
dowait ( "attack1" );
dowait ( "attack2" );
dowait ( "stop" );
}
 
The DYAW and YAWSPEED are the two important things here.
 
DYAW is the angle inside the entity window of Radiant. Whatever direction you are standing, you adjust the angle from there. In my script, my NPC was at 180. So, the first script went from 180-160 degrees, then the second went from 160-200 degrees. This gave me a 40 degree arc of fire.
 
YAWSPEED is the speed in which the NPC will rotate. The Icarus manual says this is measured in degrees per second, but, it doesn't seem to be. I used "5" , figuring it would be 4 seconds since it was a 20 degree move, but it was to fast. Then, i tried a negative number and it got slower. -10 gave a good, slow arc. 
 
 
 
 
 
Cerez likes this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...