Jump to content

Recommended Posts

1 minute ago, LSValmont said:

It uses two HOLDACTIONs on the same "Device", it gets very intense

 

This is very nice !

 

Just to know ,

i will be off the next whole week (in hospital) , so check everything that you would like to do about , in order to include them , change or fix!

 

It's very good to see this script going better !

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, GEORGE FLOROS GR said:

Just to know ,

i will be off the next whole week (in hospital) , so check everything that you would like to do about , in order to include them , change or fix!

 

I wish you a quick and long lasting recovery my friend! I've just sent you my whole mission so you can see your Mission Scripts in action (in lite form).

 

Now you have something to play besides scripting until you get to the hospital and then this mission will give you something to think about for the whole week!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I was going to suggest for the Air Drop mission that you could perhaps spawn a cargo plane when players are near the location for even more immersion =) Just a quick flyby and then delete it.

 

By the way, you will get lots of inspiration just from trying my HunterZ mission. If you get enough Intel Points even President Floros himself will ask you to escort him to his famous public speeches!

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, LSValmont said:

perhaps spawn a cargo plane when players are near the location for even more immersion =)

 

This can be done as well !

 

I 'm pretty curious now about your mission !!

Share this post


Link to post
Share on other sites
4 hours ago, GEORGE FLOROS GR said:

 

This can be done as well !

 

I 'm pretty curious now about your mission !!

 

You have it! Play it!

  • Thanks 1

Share this post


Link to post
Share on other sites
On 13/1/2019 at 6:52 AM, GEORGE FLOROS GR said:

Yes , it's way better and about the performance i will try to check about it , just to know , it's wrong to use player because it will not work on Dedicated.

 

I solved the player command problem by using 2 simple functions:

Spoiler

 


closestObject = {
params ["_list","_object","_order","_script"];

if (isNil "_order") then {_order = true};
if (isNil "_script") then {_script = "Nil";};

private _position = [0,0,0];
if (isNil "_object" || {isNil "_list"}) exitWith {_closestObject = [0,0,0];_closestObject};

switch (TypeName _object) do 
{
    case "OBJECT": {_position = getPosATL _object;};
    case "STRING": {_position = getMarkerPos _object;}; 
    case "ARRAY": {_position = _object;}; 
    case "GROUP": {_position = (getPosATL (leader _object));}; 
};

private _distanceArray = [];
if (typeName _list isEqualTo "SCALAR") then {systemChat format ["_script: %1",_script];};
private _newObjectDistance = 0;
{
	if !(isNil "_x") then
	{
		_compareObjectPos = [0,0,0];
		switch (TypeName _x) do 
		{
				case "OBJECT": {_compareObjectPos = getPosATL _x;};
				case "STRING": {_compareObjectPos = getMarkerPos _x;}; 
				case "ARRAY": {_compareObjectPos = _x;}; 
				case "GROUP": {_compareObjectPos = (getPosATL (leader _x));}; 
		};
		_newObjectDistance = _compareObjectPos distance2D _position;
		_distanceArray pushback [_newObjectDistance,_x];
	};
} forEach _list;

_distanceArray sort _order;

private _closestObject = ((_distanceArray select 0) select 1);

if (isNil "_closestObject") then {_closestObject = [0,0,0];};
_closestObject
};

closestPlayer = {
Private _allPlayables = playableUnits;
private _closestPlayer = [_allPlayables,_this,true,"1"] call closestObject;
if (isNil "_closestPlayer") then {_closestPlayer = [0,0,0]};
_closestPlayer
};

 

 

 

And then you do this in the mission files:

waitUntil {
sleep 1; 
private _closestPlayer = _Offroad call closestPlayer;
(_closestPlayer distance2d _Offroad < 25)
};

I am guessing this should be Dedicated server compatible. :drinking2:

  • Thanks 1

Share this post


Link to post
Share on other sites
On 15/1/2019 at 9:30 PM, LSValmont said:

I am guessing this should be Dedicated server compatible. :drinking2:

 

Well... !

GF_Missions_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}};

I don't know if there is something better .

( BUT you never know ! )

 

anyone else ?!

Share this post


Link to post
Share on other sites
2 minutes ago, GEORGE FLOROS GR said:

 

Well... !


GF_Missions_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}};

I don't know if there is something better .

( BUT you never know ! )

 

anyone else ?!

 

That approach works very very well but I believe:

- It requires a trigger to check if any GF_Missions_allPlayers are near the location?

- It cannot be used to individualize the closest player to a location. Only perhaps the leader of the group or a random player inside the GF_Missions_allPlayers array can be individualized using this method. So if for example a player who is not the leader nor the selected random player by the script and that player gets close to _Offroad he will not trigger the waitUntil and that is why it must rely on triggers.

 

I was looking for a simple alternative that is faster and more reliable than triggers (triggers sometimes spawn at the wrong location or even do not work right at all for me for some reason) and that is why I came up with this... but now I am using those functions for everything like getting the : _closestEnemy, _closestAlly, _closestMedic, _closestVehicle etc etc... it is very useful and saves a lot of time/resources and makes mission making easier.

  • Like 1

Share this post


Link to post
Share on other sites

It will sort all the distances of the players .

It's in your hand on how to use this code.

Share this post


Link to post
Share on other sites
42 minutes ago, LSValmont said:

I was looking for a simple alternative that is faster and more reliable than triggers (triggers sometimes spawn at the wrong location or even do not work right at all for me for some reason) and that is why I came up with this... but now I am using those functions for everything like getting the : _closestEnemy, _closestAlly, _closestMedic, _closestVehicle etc etc... it is very useful and saves a lot of time/resources and makes mission making easier.

 

Sorry but first i forgot to tell you thank you very much for sharing your code !

It's the best idea to work with functions only.!

 

I was just saying on , how to select all players etc.

 

PS. nice code !!

  • Like 1

Share this post


Link to post
Share on other sites

@all: ready, willing and able for some MP action at the weekends; one thing to check out for sure is @bl2ck dog 's persistent mission - sounds like an awesome lot of fun & I had a good time with an earlier version of it when trying  it some time ago. Or I host a mission on my dedi server, can be one of my "story" missions from SWS or anoth mission of your choice.  Only major drawback for most of you is probably my timezone.  I'm German and that means CET.

Share this post


Link to post
Share on other sites
39 minutes ago, GEORGE FLOROS GR said:

It will sort all the distances of the players .

It's in your hand on how to use this code.

 

Yeah, here is an example so you can see what I am talking about more clearly:

 

Your original script using  GF_Missions_allPlayers (One trigger, 3 WaitUntils): 

_Trigger_Present = createTrigger ["EmptyDetector", _Pos_1];
_Trigger_Present setTriggerArea [GF_Missions_Attack_Distance, GF_Missions_Attack_Distance, 0, false];
_Trigger_Present setTriggerActivation ["EAST", "PRESENT", false];
_Trigger_Present setTriggerStatements ["this","",""];

waitUntil {count list _Trigger_Present > 4};		
waitUntil {count list _Trigger_Present < 3};	
waitUntil { { _x distance _Trigger_Present < GF_Missions_Attack_Distance } count GF_Missions_allPlayers > 0 ;};
deleteVehicle _Trigger_Present;

My script using _closestPlayer (Cero triggers, 1 waitUntil):

waitUntil {sleep 1;
private _closestPlayer = _Pos_1 call closestPlayer;
_aliveEnemies = allUnits select {(side _x isEqualTo east) && (!isPlayer _x) && (alive _x) && (_x distance2d _Pos_1 < 1000) && (_x distance _closestPlayer < 1000)};
_remainigEnemies = (count _aliveEnemies);
(_remainigEnemies < 3 && _closestPlayer distance2d _Pos_1 < 1000)
};

 

Share this post


Link to post
Share on other sites
1 minute ago, LSValmont said:

My script using _closestPlayer (Cero triggers, 1 waitUntil):

 

... This is why i'm counting on you !!!!  :thumb:

Share this post


Link to post
Share on other sites
2 minutes ago, tourist said:

@all: ready, willing and able for some MP action at the weekends; one thing to check out for sure is @bl2ck dog 's persistent mission - sounds like an awesome lot of fun & I had a good time with an earlier version of it when trying  it some time ago.

 

Thank you very much @tourist  i ' ll check it !

Share this post


Link to post
Share on other sites
12 minutes ago, GEORGE FLOROS GR said:

Sorry but first i forgot to tell you thank you very much for sharing your code !

 

Hey no need to thank me! If we held a thank you for your script/code competition you would win by like 60 thanks! :don11::drinking2:I use your holster script, your missions script and your weather script in ALL my missions! 

 

So this sharing of work is my way of saying thank you!

Share this post


Link to post
Share on other sites

Posted again in RAVAGE main thread; was an accident I hijacked your thread.  Your missions will ofc see some good use in my own future mission projects; I think it might be a good idea to wait for your next version if LSValmont's ideas really help performance wise.  Haven't  yet tried the current version of your missions framework extensively though so I can't say if it really impacts performance.

Share this post


Link to post
Share on other sites
9 minutes ago, tourist said:

wait for your next version if LSValmont's

 

I can tell you already , that if you may have notice notice LSValmont's post for his new Campaign !

 

This will be also an updated new Script - Mod for Ravage Exclusive sort of .

I can 't say more , because so else it's LSValmont 's project !

 

Let's hope for biggest stuff and action with our lovely mod Ravage !

 

 

PS . I hope the traders system to get better !!!

 

I 'm Waiting now for Davidoss Project , as i noticed !!

24dd92e7d449aad7750e370587f1b27e-full.jp

 

Share this post


Link to post
Share on other sites
On 1/13/2019 at 5:19 AM, GEORGE FLOROS GR said:

 

This is very nice !

 

Just to know ,

i will be off the next whole week (in hospital) , so check everything that you would like to do about , in order to include them , change or fix!

 

It's very good to see this script going better !


Weird luck, I was in the hospital at the same time and just got out, hope you're doing better, I know I am.

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, Slay No More said:

Weird luck, I was in the hospital at the same time and just got out, hope you're doing better, I know I am.

 

I wish you the best Slay ! , because our health is really the most precious stuff in our lifes !

 

Mental and physical !

  • Like 3

Share this post


Link to post
Share on other sites
On 1/19/2019 at 8:18 AM, GEORGE FLOROS GR said:

 

I wish you the best Slay ! , because our health is really the most precious stuff in our lifes !

 

Mental and physical !



Again I hope you're making a good recovery as well friend, looking forward to the stuff you'll drop when your health is restored, hope you have a lasting recovery.

  • Thanks 1

Share this post


Link to post
Share on other sites
34 minutes ago, Slay No More said:

hope you have a lasting recovery.

 

Thank you really much Slay !

 

Spoiler

EachSophisticatedArgusfish-small.gif

 

Share this post


Link to post
Share on other sites
2 hours ago, Slay No More said:

looking forward to the stuff you'll drop when your health is restored

 

I have a lot of stuff to be honest to work with !

 

I need to publish my new temperature script and there will be also a script for the effects of this and as i was checking yesterday in Ravage topic , i decided to create a spawn script .

 

So i already have start this as well !

HmOZNMB.png

 

By the way i need also to update the GF Missions and other script as well !

 

For the Gf Missions there will be - no idea when - a different lite version edited from @LSValmont !

Just i won't say much for now !

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
46 minutes ago, GEORGE FLOROS GR said:

 

I have a lot of stuff to be honest to work with !

 

I need to publish my new temperature script and there will be also a script for the effects of this and as i was checking yesterday in Ravage topic , i decided to create a spawn script .

 

So i already have start this as well !

HmOZNMB.png

 

By the way i need also to update the GF Missions and other script as well !

 

For the Gf Missions there will be - no idea when - a different lite version edited from @LSValmont !

Just i won't say much for now !

That can be used to spawn ravage zombies ? it can be cool if we can set up the purcentage chance to spawn on each building position.

  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, damsous said:

That can be used to spawn ravage zombies ?

 

I will try to do this as much configurable it gets , in order to be able to work with every mod and cases !

  • Like 1

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

×