Jump to content
timmiej93

Overview of all available Actors, Roles and Behaviors available in EM4 [By ItchBoy & Hoppah]

Recommended Posts

Hey guys,

 

I've come across this a few times now, and I was just wondering what kind of actors there are available.

For instance, when using below piece of code, it uses ACTOR_VEHICLE, to check if a vehicle is inside that VO.

 

Game::CollectObstaclesOnVirtualObject(VO_FRONT01, l3, ACTOR_VEHICLE);

 

I can imagine there being a similar actor for persons, being ACTOR_PERSON. But what other actors are there? Is there something like ACTOR_OBJECT or anything like that? I would need that one at the moment, to check if a VO is being occupied by an object. So if anyone could list (or direct me to a list) the actors available?

 

Thanks,
Tim
Link to comment
Share on other sites

Here ya go:

enum ActorType{	ACTOR_UNKNOWN,	ACTOR_FLOOR,	ACTOR_OBJECT,	ACTOR_HOUSE,	ACTOR_VEHICLE,	ACTOR_PERSON,	ACTOR_LIQUID,	ACTOR_VIRTUAL,	ACTOR_FIREOBJECT,	ACTOR_PATH,	ACTOR_FORCEFIELD,	ACTOR_FORCEVOLUME,	ACTOR_TRIGGER,	ACTOR_STREET,	ACTOR_OPEN_HOUSE,	ACTOR_SPAWNPOINT,	ACTOR_DETAILPOLYGON,	ACTOR_WAITINGPOINT,	ACTOR_AMBIENTPOLYGON,	ACTOR_BRIDGEINSTALLPOINT,	ACTOR_STOPPINGPOINT};
Link to comment
Share on other sites

No, you'd have to filter the found actors (person type in this case obviously) by role. Like this

GameObjectList l1;Game::CollectObstaclesOnVirtualObject("virtual_object_xyz", l1, ACTOR_PERSON);for(int i = 0; i < l1.GetNumObjects(); i++){	GameObject *obj = l1.GetObject(i);	if (obj->GetType() == ACTOR_PERSON)	{		Person p(obj);		if (p.IsValid() && p.GetRole() == ROLE_SQUAD)		{			//ACTION FOR FOUND PERSON WITH ROLE SQUAD HERE		}	}}
Link to comment
Share on other sites

I'm not quite sure what you're getting at Hoppah, but I guess you think I want to use it in the same way as the ACTOR's?

 

I was only curious if there is such a variety of ROLE's and BEHAVIOR's as well.

 

I was asking this because I want to spawn vehicles, and make them act like normal civilian vehicles.

 

PS. Love your signature Hoppah, it brings a smile to my face every time  :holdglass:

Link to comment
Share on other sites

Oh right. I thought you wanted to get a list of specific personsroles within a virtual object.

 

Here you go.

enum PersonRole{	ROLE_UNKNOWN,	ROLE_CIVILIAN,	ROLE_SQUAD,	ROLE_GANGSTER,	ROLE_DROWNING,	ROLE_ANIMAL};
enum PersonBehaviour{	BEHAVIOUR_UNKNOWN				= 0,	BEHAVIOUR_CIVILIAN_NORMAL		= 0,	BEHAVIOUR_CIVILIAN_GAZER		= 1,	BEHAVIOUR_CIVILIAN_HOSTAGE		= 2,	BEHAVIOUR_CIVILIAN_TAXIUSER		= 3,	BEHAVIOUR_CIVILIAN_BUSUSER		= 4,	BEHAVIOUR_CIVILIAN_DRIVER		= 5,	BEHAVIOUR_CIVILIAN_PANIC		= 6,	BEHAVIOUR_SQUAD_UNKNOWN			= 0,	BEHAVIOUR_SQUAD_FIREFIGHTER		= 1,	BEHAVIOUR_SQUAD_POLICE			= 2,	BEHAVIOUR_SQUAD_RESCUE			= 3,	BEHAVIOUR_SQUAD_THW				= 4,	BEHAVIOUR_GANGSTER_ATTACKALL	= 0,	BEHAVIOUR_GANGSTER_ATTACKSQUAD	= 1,	BEHAVIOUR_GANGSTER_GUARDHOSTAGE	= 2,	BEHAVIOUR_GANGSTER_GUARDPASSAGE = 3,	BEHAVIOUR_GANGSTER_CIVILARMED	= 4,	BEHAVIOUR_GANGSTER_CIVILUNARMED = 5,	BEHAVIOUR_GANGSTER_THROWSTONES  = 6,	BEHAVIOUR_GANGSTER_FISTFIGHT	= 7,	BEHAVIOUR_GANGSTER_ATTACKSQUAD_SMART = 8,	BEHAVIOUR_GANGSTER_THROWMOLOTOV	= 9,	BEHAVIOUR_ANIMAL_NORMAL			= 0,	BEHAVIOUR_ANIMAL_CAT			= 1,	BEHAVIOUR_ANIMAL_SHEEP			= 2,	BEHAVIOUR_ANIMAL_COW			= 3,	BEHAVIOUR_ANIMAL_WOLF			= 4,	BEHAVIOUR_ANIMAL_HORSE			= 5,	BEHAVIOUR_ANIMAL_DEER			= 6,	BEHAVIOUR_ANIMAL_CROW			= 7,	BEHAVIOUR_ANIMAL_DOVE			= 8,	BEHAVIOUR_ANIMAL_SEAGULL		= 9,	BEHAVIOUR_ANIMAL_ATTACKINGWOLF	= 10,	BEHAVIOUR_ANIMAL_PIGEON			= 11,	BEHAVIOUR_ANIMAL_POLARBEAR		= 12};
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...