[RELEASE] - Deploy and pack bike - ARMA3 Epoch - UPDATED

FallingSheep

OpenDayZ Lord!
hey guys since theres no release section im just putting this here need it tested in the wild/public!

Deploy/Pack Ebike

What it does:
lets deploy an ebike if you 50 krypto

Difficulty:
Easy < 5 min


Requirements:
Epoch mod
mission folder access ( MPMISSIONS)
text editor

CREDITS
Leigham
Objectives
KIloSwiss

keith fitzgerald

Install:
1.
add this to the bottom of your init.sqf in you mission folder
(if you dont have a init.sqf just create one!)
Code:
waitUntil{!isNull (uiNameSpace getVariable ["EPOCH_loadingScreen", displayNull])};
waitUntil{isNull (uiNameSpace getVariable "EPOCH_loadingScreen")};
sleep 5;
Deployaction = player addaction [("<t color=""#00CF11"">" + ("Craft Bike") +"</t>"),"scripts\bike.sqf","",-97,false,false,"",""];
2. now create another sqf called bike.sqf and paste this into it,
(save it in your mpmission\scripts folder)
Code:
if (EPOCH_playerCrypto > 50) then {
    titleText ["", "PLAIN DOWN"];
    player playActionNow "Medic";
    _spawnPos = player modelToWorld [0,2,0];
    _spawnDir = (getDir player) -90;
    SPAZ = [player, _spawnPos, _spawnDir];
    EPOCH_playerCrypto = EPOCH_playerCrypto - 50 ;
    sleep 3;
    publicVariableServer "SPAZ";
    sleep 1;
    ['You bought a bike for 50 crypto. Gone at restart!',0,0.7,2,0] spawn bis_fnc_dynamictext;
    player removeAction spazbike;
} else{
    ['You need 50 crypto.',0,0.7,2,0] spawn bis_fnc_dynamictext;
};
3.place the .pbo in your @epochhive\addons folder.


thats it!
fire up your server grab some krypto and test it out!
 
Last edited:
Well maybe others like me think they have it installed but have no idea how to get it to actually work:)...
pretty used to adding scripts already have vanp, and sem ai, old style a2 loot spawns, and extra banks etc on my bornholm server but can't seem to get this to fire off!...got to run to work but will be back in a couple of hours. maybe I've not followed the what seemed very simple instructions properly or maybe I'm missing a trick:)
 

keith fitzgerald

Moderator
Staff member
serverside :
Code:
if(isServer) then {
    "SPAZ" addPublicVariableEventHandler {_this select 1 call Spawn_Ebike};

    Spawn_Ebike = {   

        private["_spawnPos","_spawnDir","_veh","_goat"];

        _spawnPos = _this select 1;
        _spawnDir = _this select 2;
        _veh = createVehicle["Ebike_Epoch", _spawnPos, [], 0, "NO_COLLIDE"];
        _veh allowDamage false;
        _veh setPos _spawnPos;
        _veh setDir _spawnDir;
        _veh setVectorUp (surfaceNormal (getPos _veh));
        _veh call EPOCH_server_setVToken;
        _veh call EPOCH_server_vehicleInit;
        _veh setVelocity [0,0,.1];
        _veh allowDamage true;
       
    };
};
clientside :
Code:
if (EPOCH_playerCrypto > 50) then {
    titleText ["", "PLAIN DOWN"];
    player playActionNow "Medic";
    _spawnPos = player modelToWorld [0,2,0];
    _spawnDir = (getDir player) -90;
    SPAZ = [player, _spawnPos, _spawnDir];
    EPOCH_playerCrypto = EPOCH_playerCrypto - 50 ;
    sleep 3;
    publicVariableServer "SPAZ";
    sleep 1;
    ['You bought a bike for 50 crypto. Gone at restart!',0,0.7,2,0] spawn bis_fnc_dynamictext;
    player removeAction spazbike;
} else{
    ['You need 50 crypto.',0,0.7,2,0] spawn bis_fnc_dynamictext;
};
 

keith fitzgerald

Moderator
Staff member
place the .pbo in your @epochhive\addons folder.

in your int.sqf use :

Code:
waitUntil{!isNull (uiNameSpace getVariable ["EPOCH_loadingScreen", displayNull])};
waitUntil{isNull (uiNameSpace getVariable "EPOCH_loadingScreen")};
sleep 5;
Deployaction = player addaction [("<t color=""#00CF11"">" + ("Craft Bike") +"</t>"),"scripts\bike.sqf","",-97,false,false,"",""];
bike.sqf

Code:
if (EPOCH_playerCrypto > 50) then {
    titleText ["", "PLAIN DOWN"];
    player playActionNow "Medic";
    _spawnPos = player modelToWorld [0,2,0];
    _spawnDir = (getDir player) -90;
    SPAZ = [player, _spawnPos, _spawnDir];
    EPOCH_playerCrypto = EPOCH_playerCrypto - 50 ;
    sleep 3;
    publicVariableServer "SPAZ";
    sleep 1;
    ['You bought a bike for 50 crypto. Gone at restart!',0,0.7,2,0] spawn bis_fnc_dynamictext;
    player removeAction spazbike;
} else{
    ['You need 50 crypto.',0,0.7,2,0] spawn bis_fnc_dynamictext;
};
 

Attachments

Hey, fellas. It works, but it's a little quirky. If you have say 2500 krypto and quickly click the 'Craft Bike' action, it will spawn 1 bike per click as long as you have money.

I'd say if the price was raised to 500 krypto and a fresh spawn had 500 at start, maybe that would be a decent implementation of this code the way it works.

Thank you, Keith and FallingSheep. Great work!
 
First of all thanks i really love this script. I am very new to scripting and don't really know how to code so please keep that in mind. Right now with this installed it works but if i die i have to log out and back in for me to get the craft bike menu. Has anyone else seen this thanks.
 
You are correct, if its your work then credit is due.
My incredulous comment was because the link that was given by Suppe doesn't have a working download link and he asks about a username Horbin who also did not make the linked to post (it was Leigham). And now you (Objectives) claim it to be yours ... So does it belong to Leigham, Horbin or Objectives? Do you see the problem here?
Is Objectives = Leigham?
And the correct thing to do by Suppe, would have been a PM to Falling Sheep with a polite request for credit rather than the accusational "Why you stealing someone elses work!!!!" which really rubs me the wrong way.

I downloaded the PBO from epochmod.com link and from this post and they are identical except for the deploybike script (differences is shown at the bottom of this post). And nowhere does it say in those original files that anyone wrote the scripts .. I could easily claim them as mine. Obviously the version posted on Epochmod.com is the earlier version and the one in posted here is using that as its source.

So let me just say that Fallingsheep and Keith Fitzgerald are both honest and reputable persons and I can assure you neither tried to intentionally claim anyone elses code as their own.
The files in the ud.pbo were not edited to claim to be the work of either of them, therefore the accusation of 'Stealing other peoples work' is completely false.

I would like to apologize on their behalf for any impression of wrongdoing as none was intended. I am sure they will also put the authors name at the top of the files for credit when that person is finally revealed.
Searching google for ud.pbo on epochmod.com reveals this post
http://epochmod.com/forum/index.php?/topic/32442-trying-to-make-an-addon-pbo/
as the only other instance of ud.pbo .. which was also Leigham.

So some clarification would be appreciated and we can get all the credit where credit is properly due.
Thanks.


 
Last edited:
Actually, let me amend my comment about the epochmod.com post being earlier.
This is the first reference I found to ud.pbo


and if you look at the top of this page, Falling sheep posted a pbo a day earlier on Feb 15th. apparently on april 9th Keith added the ud.pbo which is identical to the one from Epochmod. So ITS POSSIBLE that the original version was made by Falling Sheep, then edited by Leigham and posted on epochmod.com a day later and finally recovered by KeithFitzgerald ...
How do we know what actually happened?
And why not?
Because nobody had sense enough to ever claim credit at the top of the file.

although the common sense answer is they were simultaneous projects and the epochmod.com ud.pbo was better and discovered for use in this project 2 months later.

OR WAS IT
imagine ominous whodunit music was playing now
 
Top