Jump to content
Sign in to follow this  
dkraver

Two fast ones

Recommended Posts

OK heres the two questions.

1. Cant Jeep with Machine gun carry any weapon/ammo??? tried the name addweaponcargo weapon thing and nothing gets in.

2. Is it possible to make a AI convoy that can choose differnet routes to one spot??

As a example:Convoy reaches a T at the end of a road then sometimes it will go right other times it will go left. Does any one know how to do this?? Would think you could do it by triggers and make waypoint for all routes and when the convoy reaches the T the triggers will decide with some kind of script. Have anyone done this or have a idea on how to do it?confused.gif??

Share this post


Link to post
Share on other sites

Ok i think i got a way on how to make it change waypoint now i only need a way to only make the trigger work sometimes any got a idea on how to do this?confused.gif

Share this post


Link to post
Share on other sites

Maybe this one:

For this example we use the t-cross, where two possibilities

are - left/right:

create a random number between 1 and 2 - put the result

into a variable - (your_variable=random 1) - this creates

a random number from 0 to 1. Do this with a trigger, which

will be activated when your convoy arrives at t-cross.

Now you can create another trigger, with condition:

your_variable == 1 - this trigger will only activate, if your

random result = 1 (you could also create a random 5, it's

up to you).

Don't forget to predefine your variable with a value, that

won't be reached by your random result (in this case it's

your_variable=2).

Another way to let a trigger randomly activate is:

create a unit with 50% probability of presence, name it,

and in trigger's condition field type: alive your_unit

This would also give you a 50/50 chance of activating a trigger.

Share this post


Link to post
Share on other sites

thx Chris

I used the last one and it works the way i wanted. Also tried the first one but must be doing something wrong because i get a error message in top left corner when i try it out.

So back to the first question Cant Jeeps carry anything??? And if yes how do i do it??? anyone??? smile.gif

Share this post


Link to post
Share on other sites

k for the first version i think you got:

"error type bool expected numeric" or something like this.

Did you set the variable to a numeric one by using:

a) init.sqs

or

b) any unit's init field

or

c) a trigger with condition true

?

To explain it:

Your mission has a trigger, which is waiting for a variable

with a numeric value. If you start your mission and the

variable isn't set to any numeric value, the game asumes

that the variable is actually false, and this creates a conflict

between boolean (true,false) and numeric (any number 0-....)

So you need to tell the game that your_variable is a numeric

one.

By using the variable variant, you can expand the number

of possibilities without increasing any performance loss, while

using units or objects causes it (especially in multiplayer).

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 (Gorgi Knootewoot @ Jan. 17 2002,12:56)</td></tr><tr><td id="QUOTE">No, it is dumb to think otherwise<span id='postcolor'>

hmmmm mad.gif why is it to dumb to think they can carry anything if i had a place to upload pictures i would should how much a jeep can carry in equipment. I was a recon driver on a mercedes 4x4 short version and we had 500 to 750kg in equipment. so why shouldnt it be possible to carry anything on a jeep?confused.gif

Ok new question is it possible to change the file on the jeep so it can carry anything or put it on it from the start?? Kinda like the towjeep?? confused.gif guess it most be possible when they did it to that one smile.gif so do any have a link on how its done??

Share this post


Link to post
Share on other sites

It's possible and it's easy but you don't have to do it yourself. Kegetys' addon collection has a supply jeep that can carry ammo and weapons.

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 (Damage Inc @ Jan. 17 2002,15:58)</td></tr><tr><td id="QUOTE">It's possible and it's easy but you don't have to do it yourself. Kegetys' addon collection has a supply jeep that can carry ammo and weapons.<span id='postcolor'>

is it the closed jeep or the jeep with machine gun???

Share this post


Link to post
Share on other sites

Doh sad.gifsad.gif other i need guess im gonna make it myse´lf then you know a place witha good guide???

Share this post


Link to post
Share on other sites

You can find addon tutorials here. This is a simple addon since you don't even need to change any textures or anything.

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 (DV Chris Death @ Jan. 17 2002,12:45)</td></tr><tr><td id="QUOTE">k for the first version i think you got:

"error type bool expected numeric" or something like this.

Did you set the variable to a numeric one by using:

a) init.sqs

or

b) any unit's init field

or

c) a trigger with condition true

?

To explain it:

Your mission has a trigger, which is waiting for a variable

with a numeric value. If you start your mission and the

variable isn't set to any numeric value, the game asumes

that the variable is actually false, and this creates a conflict

between boolean (true,false) and numeric (any number 0-....)

So you need to tell the game that your_variable is a numeric

one.

By using the variable variant, you can expand the number

of possibilities without increasing any performance loss, while

using units or objects causes it (especially in multiplayer).<span id='postcolor'>

Could you do a small fast guide for me on what to make and what and where to write smile.gif for a T cross

THX

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 </td></tr><tr><td id="QUOTE"> wink.gif<span id='postcolor'>

Share this post


Link to post
Share on other sites

Well here it is:

best you start with creating an init.sqs

(you could also use any units init field or a trigger

with condition true, but the cleanest way to predefine something is by using init.sqs)

In the init.sqs you type

your_variable=2 / your_variable is any variable you want

end

The next step is to create your convoy (also try using

to name all your units, because after several tries with

editor i could figure out, that most things work better

when using names for all objects)

In this example we use only one vehicle for the convoy,

e.g: a truck

now you create waypoints for the truck (move) and the

last one place at the T-crossroad, which you need.

In our example we use a name for this waypoint (only

to make it easier to explain, you don't really need to

do it) - i use the name "decide_right"

Next you create another waypoint, which leads to the

right way of the crossroad, and then continue creating

your upcomming waypoints you want, and for the last

create a "hold" waypoint.

For this last waypoint i use the name "decide_left".

Then create more waypoints, continuing from the hold

waypoint and start by placing a wp to the left way of

the T-crossroad, and then again create wp's till you reach

the end of your required route.

Now we come to the point;

Create a trigger close to the "decide_right" waypoint, choose

a size, so that the truck will enter the trigger area and

group the truck to this trigger (F2 and drag a line from

truck to trigger) - when you are reselecting the trigger,

you should see in the activation now: vehicle

in the condition field type: this

in the onactivation field type: your_variable=random 1

Now you need two more triggers, with size 0, type: switch

place one of them near to "decide_right" waypoint, sync

the trigger (F5 and drag a line) with the waypoint, and the

other one near to "decide_left" waypoint (also sync with

waypoint).

To the trigger near the decide_right wp enter in the condition field: your_variable == 0

To the other trigger's (decide_left) condition field

type: your_variable == 1

Well this should it be - if it's not working, i could come up

with an example mission, just use the messenger in this

forum and let me know where to send it.

Sorry if there's something not clear to understand, but

that could be, because i'm from Austria and my english

may not be perfect.

Share this post


Link to post
Share on other sites

And for your ammo problem:

was your syntax like this:

unit addMagazineCargo ["M16", 10];

unit addWeaponCargo ["M16", 10]

it's from official comref

Share this post


Link to post
Share on other sites

Thx gonna try it now for the weapon part thats what i done but it wont work on the jeeps because they are apparently made not to hold anything so need to change them with the config.cpp file

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  

×