Jump to content
Sign in to follow this  
sas troop

A few simpple questions...

Recommended Posts

OK, I was making many missions before, but now I am trying to make some MultiPlayer ones. In this case I got a few questiosn. I tried to learn from great MP missions like MBFs, but its right now to big for me. So:

1. In a script Init.sqs I am making all units on map without amo and weapons. But when unit die, he spawns with a weapon! How to take gun off from him after EVERY spawn?

2. Is there any good possibility to solve medic problem? I mean how could I do that a normal soldiers class can heal other team members?

3. How to spawn vehicles? Of course I was searching that most, but I still DK! E.g. I wanna to spawn a BMP-2, a UAZ and 2 motorbikes. BMP-2 called sapc1 must spawn at centre on camo net scamo1, the UAZ (called scar1) must spawn at other netting called scamo2 and finally 2 motorbikes must spawn at one netting called scamohuge. Bikes are called smotor1 and smotor2.

4. And finally the last one: This mission what i am making is C&H. SO I need flags to keep in sides of two teams (fighting RACS and SLA, so Guerrillas and East). How to make score getting 1 point each side be controlling one flag per minute (e.g. you control 2 flags in 1 minute so you must get 4 points). And how to check the score then?

Please members, can you solve my problems?

Share this post


Link to post
Share on other sites

1. I'm not quite sure about how to remove the weapons on spawn. maybe after the respawn line put

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

#spawn

?(alive player) : removeAllWeapons player

Are the players named? Like P1, P2...etc? You would have to name them for this. If the player doesn't work try naming them and put this in the script--

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

_player = _this select 0;

? (S1 == player) : GoTo "S1"

#S1

?(alive S1) and (S1 == player) : removeAllWeapons S1

and so on for each player. i.e. S2,S3,...

--------------------------------------------------

2. For healing check these out:

Heal Script 1

Heal Script 2

One of those should solve that problem.

---------------------------------------------

3. Spawn vehicles with this--if of course you want to create a vehicle? I didn't quite understand what you were asking.

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

_vehicle = "vehicle" createvehicle (position player)

example: _Skoda = "Skoda" createvehicle (position player)

------------------------------------------------------

4. For Capturing zones use this:

Capture & Hold

or

Capture The Flag

------------------------------------------------------

Hope this helps thumbs-up.gif If you got any questions just post here again.

Share this post


Link to post
Share on other sites

Nice, thanks man. I am bad scripter, but I will try to fight with that. Only one things is not that i was talking about:

Number 2. In my mission all players can choose classes WHILE GAME, not before it start. One of them is a medic. His job is to heal other team members, but not himself. I mean how to put medic scripts for normal soldiers.

EDIT: Spawning doestont work...

I am making a trigger activated many times and activasion "everybody". In condition I give:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NOT alive sacp1

AND in activasion field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sla1 exec "bmpspawn.sqs";

I tried also with e.g. [sla1] exec or "this exec". Nott working. No error message, nothing!

A script is:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;BMP-2 APC SPAWN>

;THIS WILL SPAWN YOU BMP AFTER 2 MINUTES

#start

@NOT alive sapc1

sla1 sidechat "BMP-2 HAS BEEN DESTROYED!!! THE NEW ONE WILL SPAWN IN 2 MINUTES"

~120

_vehicle = "BMP2" createvehicle (position sapc1marker);

goto "start"

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;BMP-2 APC SPAWN>

;THIS WILL SPAWN YOU BMP AFTER 2 MINUTES

#start

@NOT alive sapc1

sla1 sidechat "BMP-2 HAS BEEN DESTROYED!!! THE NEW ONE WILL SPAWN IN 2 MINUTES"

~120

_vehicle = "BMP2" createvehicle (position sapc1marker);

goto "start"

Are you sure @NOT alive is a proper code? huh.gif

Ah to fix this, you need--

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_BMP2 = "BMP2" createvehicle (position sapc1marker); Instead of _vehicle = ... in which you had.

Also for allowing soldiers to spawn, I think you just put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [name] exec "heal.sqs" or whatever the name of the script is. In the soldiers Initialization line in the editor.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;BMP-2 APC SPAWN>

;THIS WILL SPAWN YOU BMP AFTER 2 MINUTES

#start

@NOT alive sapc1

sla1 sidechat "BMP-2 HAS BEEN DESTROYED!!! THE NEW ONE WILL SPAWN IN 2 MINUTES"

~120

_vehicle = "BMP2" createvehicle (position sapc1marker);

goto "start"

I belive

@NOT alive sapc1

should be

!alive sapc1

Share this post


Link to post
Share on other sites

you could also try

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(alive sapc1) then

{

"";

}else{

GoTo "Spawn";

};

#spawn

hint "The APC has been destroyed! A new one is being built."

~120

_BMP2 = "BMP2" createvehicle (position sapc1marker);

GoTo "Exit"

#Exit

exit

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  

×