Jump to content

Basic ICARUS Fundamentals I seem to be Missing


Go to solution Solved by Ramikad,

Recommended Posts

Hey folks,

 

Sorry to make what is probably a super redundant post, but I can't seem to find any good tutorials for ICARUS scripting when it comes to what I imagine are basics.

 

Specifically, 

 

1. Spawning NPCs

2. Triggering things using their targetname

3. Moving NPCs, brushes, and models.

 

Are there any good tutorial series out there that go over these basics?

 

Link to comment
  • Solution

Hey folks,

 

Sorry to make what is probably a super redundant post, but I can't seem to find any good tutorials for ICARUS scripting when it comes to what I imagine are basics.

 

Specifically, 

 

1. Spawning NPCs

2. Triggering things using their targetname

3. Moving NPCs, brushes, and models.

 

Are there any good tutorial series out there that go over these basics?

 

It's technically not easy spawning NPCs through ICARUS - it doesn't have a "spawn" command, but it can be achieved with a trick that involves the command SET_VIDEO_PLAY, which would work like this:

//(BHVD)
set ( /*@SET_TYPES*/ "SET_VIDEO_PLAY", "-;cl_noprint 1;helpusobi 1;npc spawn stormtrooper;helpusobi 0;cl_noprint 0" );

Although it should technically work, and it opens up a lot of possibilities in-game, it's really a workaround. A much easier and better way to spawn an NPC is to use a NPC_Spawner previously put in the map in GTK Radiant (but I guess entity modding to insert one should work as well): you just need to assign the NPC_Spawner a targetname (for example, stormtrooper1). Then, in ICARUS, you just need this simple command:

//(BHVD)
use ( "stormtrooper1" );

to use the NPC_Spawner and thus spawn the NPC. The same thing applies if you want to trigger any entity through scripts: you just need to assign that entity a targetname and create the proper script for that.

 

As for moving NPCs, you need to assign the NPC_Spawner a NPC_targetname (I'm not sure, but it should be different from the targetname), which you'll have to use if you want to affect them through scripts:

//(BHVD)
affect ( "stormtrooper_1", /*@AFFECT_TYPE*/ FLUSH )
{
    set ( /*@SET_TYPES*/ "SET_SABER1", "luke" );
}

To move them, you'll need to put a system of waypoints in your map. This tutorial does a good job at explaining how to do this.

 

To move brushes, you need to make them brush-based entities in the first place: func_static, func_door, maybe func_breakable too, but I'm not sure. There's an easy explanation of how things work here.

RebelChum likes this
Link to comment

Thanks for all the help Ramikad and very useful links!

 

To move brushes, you need to make them brush-based entities in the first place: func_static, func_door, maybe func_breakable too, but I'm not sure. There's an easy explanation of how things work here.

How would that work for moving a model? Adding a model key/value to a func static or using a misc_model of some sort? Is it even possible to move a model?

Link to comment

Thanks for all the help Ramikad and very useful links!

 

 

How would that work for moving a model? Adding a model key/value to a func static or using a misc_model of some sort? Is it even possible to move a model?

 

The easiest possible way, which I use sometimes, is just to link the model to the entity (Ctrl + K). Once they're linked, the model will move with the entity.

sndwav and RebelChum like 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...