help needed: Sensor based perks

JohnYoung

Member
Hey guys,

What i am trying to implement on my server are perks based on sensors, ie: if a player enters a particular area, they will be able to selfBB.

I can set up the sensor in mission file no worries however i am stuck on how to implement the selfbb for that player.

i am using krixes self bb script: http://opendayz.net/threads/krixes-self-bloodbag-script.12288/

i know that i need to set the mission sensor to execute the player_selfbloodbag.sqf however i would need to modify the sqf to include the scroll wheel menu? or would i need to have a seperate sqf that initiates the scroll wheel option which then executes the player_selfbloodbag.sqf file?

a little lost on this one. any help would be greatly appreciated/

thanks!

John
 
Hey guys,

What i am trying to implement on my server are perks based on sensors, ie: if a player enters a particular area, they will be able to selfBB.

I can set up the sensor in mission file no worries however i am stuck on how to implement the selfbb for that player.

i am using krixes self bb script: http://opendayz.net/threads/krixes-self-bloodbag-script.12288/

i know that i need to set the mission sensor to execute the player_selfbloodbag.sqf however i would need to modify the sqf to include the scroll wheel menu? or would i need to have a seperate sqf that initiates the scroll wheel option which then executes the player_selfbloodbag.sqf file?

a little lost on this one. any help would be greatly appreciated/

thanks!

John

It might be WAY easier to just use the limitation format of the SBB script (limits it to being within a certain distance of a building) then put that building wherever, if that makes sense...
 
It might be WAY easier to just use the limitation format of the SBB script (limits it to being within a certain distance of a building) then put that building wherever, if that makes sense...

hi matt,

i hear ya. thats a good idea however i would like to add an array of perks using this method.

one possible scenario would be to have an event arena which when players enter, they are given specific perks that they would not normally have.

so for this reason, having a way of activating these scripts via the sensor, or at least activating the scroll wheel option which in turn makes the script activated would be ideal.

other uses would be to integrate with sporkmod's dayz of glory mod where each XP level up could unlock an ability.

def keen to hear your take on this.

thanks,

john
 
hi matt,

i hear ya. thats a good idea however i would like to add an array of perks using this method.

one possible scenario would be to have an event arena which when players enter, they are given specific perks that they would not normally have.

so for this reason, having a way of activating these scripts via the sensor, or at least activating the scroll wheel option which in turn makes the script activated would be ideal.

other uses would be to integrate with sporkmod's dayz of glory mod where each XP level up could unlock an ability.

def keen to hear your take on this.

thanks,

john

Well, if you went the menu way of it (Wardrobe / Ebays spawn selection kinda menu) then you can modify any number of scripts to work, you just have to have the sensor activate the first script, that then initiates the menu.
 
Is there a way to do it where if you have a certain skin (model) it will allow you to activate something, as in like something for only players with soldier clothes can do?
 
Haven't tested it but it should work:
Code:
_cplayerskin = ([3713.8, 5986.02, 0] nearEntities [["Man"], 50]);
 
        {
          if (_x isKindOf "Soldier1_DZ") then {
          _cplayerskin = _x;
          myaction = player addaction ["My Action","scripts\myaction.sqf","",5,false,true,"",""];
          };
        } forEach _cplayerskin;

And as matt said: if you want to add several actions to the same player just use a commanding menu instead.
http://community.bistudio.com/wiki/showCommandingMenu


What does your first part of the code do? I am looking into a sensor in mission, pointed to the script, and what it will do is set players wearing soldier skin at an advantage, and any other players will be punished to say.. as an example here
Code:
private ["_model"];
if (_model == "Soldier1_DZ") then {
setviewdistance 1000;
} else {
setviewdistance 1;
};

if (_model == "Soldier1_DZ") then {
or
if ((_model player) in ["Soldier1_DZ"]) then {
Doesn't work and the way it looks, they should.. not sure whats wrong there, any pointers?
 
Back
Top