Jump to content
Sign in to follow this  
Ike_Trak

Changing Unit model - type - side, possible?

Recommended Posts

This is my first post in the forum. I am very happy to be included to this very nice games' community even if I discovered it lately.

I have 2 questions.

1) I want to make a spy mission. In the mission, I will first look like a civilian, wander around and the enemy wont attack me. After meeting a certain condition, I will wear camos again and then I want the enemy to see me as enemy (changing sides, model and/or unit type needed).

2) While spying I want to perfrom several actions that are not on games' action list, i.e. pickpocket someone for a document. Only keystone in this is that action name must appear in the action list, the rest and effects can be scripted easily.

Are these possible? If anyone can help I will be most thankfull. Thank you for your time and salutations from Turkiye.

Share this post


Link to post
Share on other sites
Quote[/b] ]1) I want to make a spy mission. In the mission, I will first look like a civilian, wander around and the enemy wont attack me. After meeting a certain condition, I will wear camos again and then I want the enemy to see me as enemy (changing sides, model and/or unit type needed).

You can't change sides in game but you can make a civilian west, res or east in the editor. I assume you want to end up enemy to east? If so, you need to make a west unit that out ranks your civil unit. Then use F2 key to drag a line from west unit to civil so they are grouped. Then go into the west units settings and set his probobility of presence to 0% (its a slider you just drag all the way to left). The west should not be present when you play the game but you will be west side and east will shoot at you. To keep the enemy from shooting at you use "this setcaptive true" (without the quotes) in the civilians init field. Then in a trigger you can set the civilian back to setcaptive false and enemy will then attack him.

I don't know much about addaction. Are you making a single or multiplayer mission?

From comref:

unit addAction action

Operand types:

   unit: Object

   action: Array

Compatibility:

   Version 1.1 required.

Type of returned value:

   Nothing

Description:

   Create an action. Action ID should be returned, but due to bug it is not. Action ID should be returned, but due to bug it is not. To determine action ID use following algorithm: first action added to given vehicle has ID zero, next has ID one, etc.

Example:

   player addAction ["Hello", "hello.sqs"]

Share this post


Link to post
Share on other sites

single player mission. Thanks for pointing out how to start as a west - civilian and not making enemy attack. During the game after a condition is met, I can cancel captive mode, thats ok, but is there a way to change my appearence again?

From civilian men look to camoed soldier look.

From the info you have given I see its possible to define new actions other than predefined actions of the game, thanks.

Share this post


Link to post
Share on other sites

1) You can only change the side. To change the player model you'll have to create a mini campaign with two missions.

2) Addaction/removeaction are the commands you need. But don't use them as shown in the comref example. Most of the time it's unnecessary to add the action directly to the player unit.

To add the action:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">actPICKP = victim1 addaction ["Grab Purse", "steal.sqs"]

To delete the action later:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">victim1 removeaction actPICKP

The actPICKP variable will store the actionID you need for removeaction.

Victim1 is the name of the unit which shows up the action in your menu when you approach it.

EDIT:

Steal.sqs is the script that will be executed with this action. You can also detect who was the "button" and who "pushed" it, inside of the script.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">button = _this select 0

PushedBy = _this select 1

But you'll have to try that. Maybe 0 and 1 is vice versa.

Share this post


Link to post
Share on other sites

In comref_102002 this stroke my attention now; can it be what I am looking for (change player texture)

object setObjectTexture texture

Operand types:

object: Object

texture: Array

Compatibility:

Version 1.75 required.

Type of returned value:

Nothing

Description:

Null

Share this post


Link to post
Share on other sites

You need a compatible unit for the command to work and there is none afaik.

Only some custom vehicle addons display different number textures that way.

So if you find an addon maker that creates the desired spy with two texture sets for you, this could be a solution. Such an addon should be possible for single player.

Share this post


Link to post
Share on other sites

You might want to look for the "Generic OPFOR" addon.

It was an addon that used setObjectTexture to change the shirt color and what not for random rag-tag enemy guys.

It isn't 100% what you are lookng for, but you'll be able to say change from a white-shirt guy to perhaps a camo one (I think camo shirts were included) however, the model looks the same....

http://www.flashpoint1985.com/cgi-bin....t=43573

Share this post


Link to post
Share on other sites

Thank you all for your answers. Generic OPFOR is just what I needed. I am also making use of your multiple choice dialog scripts which come very handy for adventure style mission making.

Share this post


Link to post
Share on other sites

wqell you should be able to do that in ArmA lol

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×