Jump to content
Sign in to follow this  
Little Blue Assassin

I can't create the stinking guy with the trigger

Recommended Posts

Okay, okay, I did exactly what I was told to do. I made a marker called "bugger," and made a trigger activated by Radio Alpha. In the "on activation" line of the trigger, I put

"t55g" createUnit [getmarkerPos "bugger",groupAlpha]

I made a civilian stand right in front of the "bugger" marker, and set him as the player. I tested this and activated Radio Alpha. ALACAZAM! Nothing...

What am I doing wrong? I have searched very extensively on this and nobody else seems to be having this little problem.

Share this post


Link to post
Share on other sites

Hello.

Does this groupAlpha exist?

if not, create resistant soldier

init-field: groupAlpha=Group This

Try again.

And, if you should do this spawn in multiplayer, you need to do it via a script, like this:

trigger Radio Alpha

on activation: ["T55G",groupAlpha] exec "create.sqs"

[in create.sqs]

_vType = _This Select 0

_vGroup = _This Select 1

...

which reminds me, this is for soldiers.

Vehicles should be spawned with "CreateVehicle"

e.g.

_tank1 = "t55g" CreateVehicle GetMarkerPos "bugger"

hope this helps

Share this post


Link to post
Share on other sites

As far as I know, it is not possible to create new groups(in runtime)

Groups needs to be defined and created in editmode.

If you want to defined new groups, but do not want units(soldiers) hanging about, write this in their init-field:

%groupname% = Group This; DeleteVehicle This

This will create an "empty" group for you, which you can spawn new units into.

However, there's some problems with this "spawn into groups" in Multiplayer, the game does not assign any group id's to the newly creted units.

e.g.

Let's say groupAlpha consist of a group leader: "Alpha Black:1"

you spawn a new soldier:

"SoldierWB" CreateUnit [GetMarkerPos "bugger",groupAlpha]

This soldier will not get

Alpha Black:2

Even thou it is in Alpha Black:1's group.

Also, if you want to spawn units in MP, make sure you have a gamelogic placed in the editor, called Server (or whatever)

in the script:

?!(Local Server): Goto "End"

"SoldierWB" CreateUnit [GetMarkerPos "bugger",groupAlpha]

#End

exit

By doing this, you prevent multispawning.

If you do not have the ?!(Local Server): Goto "End"

The game will create one unit for each client, plus the server.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Little Blue Assassin @ Feb. 06 2003,19:19)</td></tr><tr><td id="QUOTE">Ah, thank you, Taurus, that is immensely helpful.<span id='postcolor'>

You're welcome wink.gif

Share this post


Link to post
Share on other sites

Well, I think htere is a way to create new groups in runtime using one group (can be empty) as an infirmary.

myMan = man createUnit [bla bla ,existingGroup];

[myMan] join grpNull;

newGroup = group myMan;

That's more less it.

Share this post


Link to post
Share on other sites

Here's a little update. I gave up on mission editing for a while, and now I am trying again. I still cannot create a unit, even when I am trying to create it into an existing group with a unit already in it. This is exasperating. Why isn't there a manual? I did exactly what the stinking command reference said!

I made a marker called "sod" and a trigger activated by Radio Alpha, and put this in the "on activation" line of the trigger:

"uh60mg" createunit [getmarkerpos "sod", groupalpha]

I then made a soldier and put this in his init line:

this setgroupid ["alpha","groupcolor3"]

However, the trigger did not work. So, I found out what "groupcolor3" is by placing a unit (let's call him "Bill") in another group on the same side as the soldier in the group whose color is "groupcolor3" (we'll call this guy "Bobby"). I played as Bill, and shot Bobby in the leg. Bobby said "Alpha Black One, cease fire!" When he said this, it called him "Alpha Green One." Thus, "groupcolor3" is green.

Then I changed the trigger to

"uh60mg" createunit [getmarkerpos "sod", groupalphagreen]

It still didn't work. Can anyone help me? Does anyone even follow me?

Share this post


Link to post
Share on other sites

Your unit type looks like a vehicle, not a soldier. Try "SoldierWB" instead.

Doolittle

Share this post


Link to post
Share on other sites

Aha!  Thank you, Doolittle...I would never have found that problem.  How do you create a manned vehicle?  Would creating an empty vehicle and a separate crew and inserting the crew via init line work?  How do you name a created vehicle?

[edit]I just tried it. Even using "soldierwb," it doesn't work.  Would you please type out the exact script which you use to create a soldier?  I believe that my problem lies in my grouping method.  I have no clue what I am doing here.[/edit]

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Little Blue Assassin @ April 04 2003,11:00)</td></tr><tr><td id="QUOTE">Aha!  Thank you, Doolittle...I would never have found that problem.  How do you create a manned vehicle?  Would creating an empty vehicle and a separate crew and inserting the crew via init line work?  How do you name a created vehicle?

[edit]I just tried it.  Even using "soldierwb," it doesn't work.  Would you please type out the exact script which you use to create a soldier?  I believe that my problem lies in my grouping method.  I have no clue what I am doing here.[/edit]<span id='postcolor'>

You can name the vehicle if you don't use a local variable.

Instead of:

_tank = "M1Abrams" createVehicle getmarkerpos "tankFactory"

use:

tank = "M1Abrams" createVehicle getmarkerpos "tankFactory"

Then move your crew into the tank:

someguy moveindriver tank

etc...

Just tried it using triggers, it worked.

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  

×