Jump to content

Icarus scripting?


Recommended Posts

Hi,

 

Has anyone here used Icarus scripting, used with Voyager Elite force?

 

set( “SET_BEHAVIOR_STATE”, “BS_PATROL” )
 

In the Behaved program there are Parms. So Parm1

 

I don't know how to get an NPC to just shoot at an enemy.

Link to comment

Hi,

 

Has anyone here used Icarus scripting, used with Voyager Elite force?

 

set( “SET_BEHAVIOR_STATE”, “BS_PATROL” )
 

In the Behaved program there are Parms. So Parm1

 

I don't know how to get an NPC to just shoot at an enemy.

 

 

SET_ENEMY "targertname"

With BS_DEFAULT behavour. :)

Link to comment

 

Thanks for posting, unfortunately that didn't work.

//Generated by BehavEd

rem ( "comment" );

affect ( "borg1", /*@AFFECT_TYPE*/ FLUSH )
{
	set ( "SET_ENEMY", "BS_DEFAULT" );
}

 

 

 

O.o :huh: :huh:

Sure it not work man. I think is the first time you use icarus.

you need to put two separate command:

SET_ENEMY "targetname"

SET_BEHAVOUR_STATE BS_DEFAULT

understood?

every command is a separate line \ string.

if you want the NPC attack the player, you need to set.

SET_ENEMY "player"

if you want an NPC attack another opponent you need to set the opponent's targetname into the radiant map.

example: SET_ENEMY "merc1" the enemy will search, attack and chase a NPC with "merc1" as targetname.

 

BEHAVOUR state change the behavour of the NPC. in that case it set the AI of NPC to default setting. so if an NPC was into cinematic modality, because you place into the map with cinematic spawnflag, this turn NPC into Default modality with full AI.

i suggest you however to study how are the icarus script of the default JA \ JO ibi files, for fully understand how work scripting.

Link to comment

Not sure if Voyager Elite Force is any different, but in JA you should set the NPC_targetname, not just the name. Otherwise, you could just remove the "affect targetname" in the script, in that case the behavior and enemy choosing should be set up on any NPC that script is used on.

Link to comment

I tried NPC_targetname in the script as well as in the GTK. The Behaved script maker compiled it, but it did nothing.

 

I had tried this on here almost a year ago, that was NPC walking, not attacking at a distance.

 

Attacking is a start, and certainly a must for any game, otherwise there isn't much point unless a cyber walk through the levels with other NPC's is the entertainment of the moment. :D

 

I also wanted to enquire, the level I have edited has a menu to load the map. Where would I find the source for that? I tried to add an NPC from that map into a map I have made which is seperate from the Pak3 file of a mod. So the alternative would be to add in the custom map and link it to a menu, how could I do that?

 

I tried to get an answer on the Quake 3 forums, but so far nothing. As for the creator of the mod, the man who made it doesn't care or respond to my emails.

Link to comment

i think with BS_WALK AI of enemy is turned off, so he ignore and not attack and walk randomly throught nav grid of waypoints.

you need to set an angerscript, or an awakescript, to the enemy, so when enemy see the player will attack it.

on the angerscript or awakescript you can put this:

SET_BEHAVOUR_STATE BS_DEFAULT

SET_ENEMY, player

 

By the way i use BS_WANDER instead of BS_WALK.

Link to comment

According to the word file guide, it is walk only for elite force.

 

 

Flow Control Commands

(flush, loop, wait, if, affect, run)

These are the commands that control the “flow” of the script.  In other words, they affect how and when commands are executed.

 

rem – this command doesn’t actually control the flow of the script, it is just a comment.  You can put notes to yourself in here or a description of the action to make it easier for others to read the script, etc.  It’s generally a good practice to put a rem as the first line of your script so you can tell what the script does just by looking at the first line.

 

flush – This command will clear out any and all commands that have not yet executed on an entity.  This does not clear any set values or other such variables you may have set on an entity, just the unprocessed commands.

 

For example, you have one script that is run right away:

 

set ( “bState”, “BS_WALK” )

set ( “navgoal”, “walk1” )

wait ( 3000 )

print ( “Hello!” )

 

But then, after the first two commands have been run, another script is run on the entity that does this:

 

flush()

set ( “bState”, “BS_HUNT_AND_KILL” )

print( “I kill you!” )

 

The “flush” command will clear out any commands that haven’t run yet in the first script.  Assuming this second script ran before the wait and print commands of the first script were executed, the NPC would now ignore those altogether, go into a Hunt and Kill Behavior State and print “I kill you!”.  It would never wait the 3 seconds and print “Hello” – those commands have been “flushed”.

 

Flushes are useful for clearing previous scripts that are running in loops.  A flush will delete that loop.

 

loop – is a simple command that allows you to execute a sequence of commands repeatedly.  So instead of:

wait ( 3000 )

print ( “Hello World!” )

wait ( 3000 )

print ( “Hello World!” )

wait ( 3000 )

print ( “Hello World!” )

wait ( 3000 )

print ( “Hello World!” )

 

You could simply use:

 

Loop ( 4 )

{

wait ( 3000 )

print ( “Hello World!” )

}

 

If you wish a loop to continue forever, put a “-1” in the loop number.

 

Loop ( -1 )

{

wait ( 3000 )

print ( “Hello World!” )

}

 

This will make these two commands repeat forever or until these commands are flushed.

 

Wait – Is a simple command used to make a script wait a certain number of milliseconds before continuing.  1000 milliseconds equals one second.

 

For example:

 

print( “Hello…” )

wait( 1000 )

print( “World!”)

 

Will make the script print “Hello…”, wait a second, then print “World!”.

 

if – This command will let you specify a condition that must be satisfied in order to execute a certain block of commands.

 

The simple format is:

 

if ( value1 = value2 )

{

print( “Hello World!” )

}

 

The only values you can check are variables and values you obtain using the “get” command.

 

For example:

 

if ( get(FLOAT, “health”) > 0 )

{

print( “Hello World!” )

}

 

More on the variables and the “get” command later…

 

You may also put an “else” block of commands after the if command:

 

if ( get(FLOAT, “health”) > 0 )

{

print( “Hello World!” )

}

else

{

print( “Hey, I’m dead!” )

}

 

NOTE: The “else” command is not yet available in the BehavEd editor...

 

affect – This command is used to send a block of commands to an entity other than the one

I tried the example of the connecting walking posts, and NPC to walk last year. It doesn't work.

Link to comment
  • 3 weeks later...
  • 2 weeks later...

Sure. But remember getting the NPC to fire hasn't worked. As for the waypoints I did try that last year, but that wasn't the important part of a modification. I'd rather that the attack worked than a enemy NPC walk.

Link to comment
  • 3 weeks later...

Sure. But remember getting the NPC to fire hasn't worked. As for the waypoints I did try that last year, but that wasn't the important part of a modification. I'd rather that the attack worked than a enemy NPC walk.

 

Well, what I did was just copy a number of waypoints and some enemies from a map that and just placed them in a map I was editing from an old mod, and that will have to do.

 

They respond to attack. As for where the script is, I honestly don't know. Pak0,1,2,3 not in those.

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...