Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Sabre=TE=

Basic mission development problems

Recommended Posts

Hi guys,

I've just finished developing my first couple of very basic missions. The basics of the missions work fine but I encountered a couple of problems when I tested them out in multiplayer.

1. The missions have a respawn but when respawned the players lose the mission specified kit and end up with the default load out for the unit. Is there any way the characters can retain the specified kit on respawn?

2. The first aid module also seems to stop working once a player respawns. Is there any way to stop this happening.

3. Join in progress - any players joining after mission start can't see the briefing notes or objectives. Is it possible to fix this?

4. Is it possible to stop join in progress?

5. Is it possible to increase the replayability of the missions by randomising some aspects eg where units are on a map etc?

I'm really very new to all this. I'd like to use stuff like Norrins revive script but I just get completely baffled when I read it.

Sorrry for all the questions but any help would be really appreciated.

Edited by Sabre=TE=
Spelling

Share this post


Link to post
Share on other sites

1. You have to script it. waitUntil {!alive _unit}; store contents of player in arrays, then... waitUntil {alive _unit}; add back contents from array.

2. Have no idea, I've heard it's buggy.

3. Yes, you just have to execute the script that adds objectives, when a player JIPs, i.e. via onPlayerConnected (this would be my first try anyway).

4. Lock server?

5. Check Domination for randomness. For simpler stuff, try connecting stuff in the editor to empty markers, or change the probability factors.

Share this post


Link to post
Share on other sites
1. You have to script it. waitUntil {!alive _unit}; store contents of player in arrays, then... waitUntil {alive _unit}; add back contents from array.

2. Have no idea, I've heard it's buggy.

3. Yes, you just have to execute the script that adds objectives, when a player JIPs, i.e. via onPlayerConnected (this would be my first try anyway).

4. Lock server?

5. Check Domination for randomness. For simpler stuff, try connecting stuff in the editor to empty markers, or change the probability factors.

Thanks for your reply but I have no idea how to do the script stuff.

Share this post


Link to post
Share on other sites
5. Check Domination for randomness. For simpler stuff, try connecting stuff in the editor to empty markers, or change the probability factors.

Interested in learning more about this point (#5)......Where / how do the probability factors work...... Is it as easy as creating units and just hitting their probablity to show up on the map (the slider bar)...moving that down toward say the mid way point?? I never thought of that simple idea?

Share this post


Link to post
Share on other sites

  1. In your unit's initialisation line, put the following:
    this addEventHandler ["killed", {
    [this] execVM "respawn.sqf";
    };


    Now, the file 'respawn.sqf' will contain the following code:

    _unit = (_this select 0) select 0;
    _weapons = (_this select 1) select 0;
    _magazines = (_this select 1) select 1;
    
    waituntil {alive player};
    
    _unit = player;
    removeallweapons _unit;
    {_unit addmagazine _x} foreach _magazines;
    {_unit addweapon _x} foreach _weapons;


  2. I think you'll have to re-synchronise the unit to the module upon respawning. You could place this inside our previously-created 'respawn.sqf', but I'm not totally sure on how to do it. Look up synchronising with code.
  3. I'm not too experienced with briefings or objectives, so I can't really help you with that.
  4. To stop JIP you could Lock the server. That should be available in the 'Server Control' dialogue, accessed from the Map.
  5. In each unit's 'Insert Unit' dialogue are the two settings below. These can add a nice amount of randomness in missions without going too much into complicated coding. It can change the amount of troops which spawn and where they do.
    • Probability of Presence
    • Placement Radius

Hopefully that helped.

Share this post


Link to post
Share on other sites
  1. In your unit's initialisation line, put the following:
    this addEventHandler ["killed", {
    [this] execVM "respawn.sqf";
    };


    Now, the file 'respawn.sqf' will contain the following code:

    _unit = (_this select 0) select 0;
    _weapons = (_this select 1) select 0;
    _magazines = (_this select 1) select 1;
    
    waituntil {alive player};
    
    _unit = player;
    removeallweapons _unit;
    {_unit addmagazine _x} foreach _magazines;
    {_unit addweapon _x} foreach _weapons;


  2. I think you'll have to re-synchronise the unit to the module upon respawning. You could place this inside our previously-created 'respawn.sqf', but I'm not totally sure on how to do it. Look up synchronising with code.
  3. I'm not too experienced with briefings or objectives, so I can't really help you with that.
  4. To stop JIP you could Lock the server. That should be available in the 'Server Control' dialogue, accessed from the Map.
  5. In each unit's 'Insert Unit' dialogue are the two settings below. These can add a nice amount of randomness in missions without going too much into complicated coding. It can change the amount of troops which spawn and where they do.
    • Probability of Presence
    • Placement Radius

Hopefully that helped.

Huh!! "Placement Radius".....I've completley overlooked this option, wasn't aware of it. Very cool. Thanks.

Share this post


Link to post
Share on other sites

you can use placement radius on waypoints aswell so they dont go to the exact same place everytime

Share this post


Link to post
Share on other sites

Good tip zigzag!

One of the best things about Placement Radius is that it makes your mission look that much cooler in the editor! :P

Share this post


Link to post
Share on other sites
  1. In your unit's initialisation line, put the following:
    this addEventHandler ["killed", {
    [this] execVM "respawn.sqf";
    };


    Now, the file 'respawn.sqf' will contain the following code:

    _unit = (_this select 0) select 0;
    _weapons = (_this select 1) select 0;
    _magazines = (_this select 1) select 1;
    
    waituntil {alive player};
    
    _unit = player;
    removeallweapons _unit;
    {_unit addmagazine _x} foreach _magazines;
    {_unit addweapon _x} foreach _weapons;


  2. I think you'll have to re-synchronise the unit to the module upon respawning. You could place this inside our previously-created 'respawn.sqf', but I'm not totally sure on how to do it. Look up synchronising with code.
  3. I'm not too experienced with briefings or objectives, so I can't really help you with that.
  4. To stop JIP you could Lock the server. That should be available in the 'Server Control' dialogue, accessed from the Map.
  5. In each unit's 'Insert Unit' dialogue are the two settings below. These can add a nice amount of randomness in missions without going too much into complicated coding. It can change the amount of troops which spawn and where they do.
    • Probability of Presence
    • Placement Radius

Hopefully that helped.

Thanks for your help. The probability and placement radius are very useful.

Do I need to amend the respawn.sqf at all or can I just copy and paste? (sorry but this is like being back at school for me and I'm al long way past those days)

I've got another slight problem. I've set up a squad grouped with a truck to respond to a trigger. Everything works fine except when the squad recah the "get out" waypoint only two squad members actually get out, the rest of the squad remain in the back of the truck. Any ideas what I'm doing wrong?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×