MadranLamont
-
Content Count
15 -
Joined
-
Last visited
-
Medals
Posts posted by MadranLamont
-
-
I have been working on a Dialog where you enter a password and click a button, then it will let you log into an admin menu. I have everything working but when i try to use the ctrlText it does not work. I am guessing that i am using it the wrong way. can some one give me an example of how to use it? Thank you in advance.
-
I was going to use the MCC sandbox as my base script (at least till I get better at dialog) so if there is a way to add a password to that till I could learn to make my own (which is my end goal) that would be great. Yah i know thats kinda a cheep way to do it but i can do scripting like a champ i just have not got a grasp on the dialog yet.
-
In a way yes it does help me to show that you can make the menu with a map and everything, but what I really need is a Way to lock the menu with a password.
-
Ok, first off I am not sure if this is the right place to post this even though I think this can be done by scripting with an .sqf and so on. I have been looking for a way to create a menu system for my Admins on my game modes that lets them login and use a menu to spawn things and other commands... but, I have come up empty handed when I have tried to find anything like this. Is there anything out there that someone has made that I could look at and fine tune to my own needs? or perhaps someone can lead me to anything close to it? I give my thanks ahead of time to anyone that can help me with this, because this has been a pain in my side for some time now.
-
To get the vehicle to spawn further away, you have to give it more specific postion requirements. This will also help with your question about getting it to move away after. I also tackle the naming issue. Try this.// Store the a position 500 meters north of the player's current postion. vehicleOrigin = ((position player select 0), ((position player select 1) - 500), (position player select 2)); // Spawn a vehicle at the postion stored above. myVehicleArray = [vehicleOrigin, 180, "BMP3", EAST] call bis_fnc_spawnvehicle; // Store a pointer to the vehicle object returned as part of the function call above. myVehicle = myVehicleArray select 0; // You can name it anything you want. // Move the vehicle to the player's current postion. myVehicle doMove (position player);
You do not need to name the vehicle in the traditional manner because bis_fnc_spawnvehicle returns an array in this format:
select 0: created vehicle (Object), select 1: all crew (Array of Objects), select 2: vehicle's group (Group)
So, if you store the first element in the array to a global variable you can then refer to the vehicle.
There are several ways to get the vehicle to move off when you are finished: Waypoints, triggers, etc. Here is one way that is fairly simple:
// Return the vehicle to its origin. myVehicle doMove vehicleOrigin; // Wait two minutes to give the vehicle time to leave (adjust as needed). sleep 120; // Delete the vehicle's crew. {deletevehicle _x} forEach crew myVehicle; // Delete the vehicle. waitUntil {(count crew myvehicle) == 0}; deletevehicle myvehicle;Hope this helps! Good luck!
Well first off let me say thank you for your help on this. But, here comes the bad news... it seems that the vehicle now no longer spawns when i use
vehicleOrigin = ((position player select 0), ((position player select 1) - 500), (position player select 2)); myVehicleArray = [vehicleOrigin, 180, "BMP3", EAST] call bis_fnc_spawnvehicle;
any thoughts?
Edit: well i found that it is making it not spawn
vehicleOrigin = ((position player select 0), ((position player select 1) - 500), (position player select 2));
because it spawns when i use simple
vehicleOrigin = position player;
its just that it still kills me like i new that would. I will try and mess with it and get it working but if you or any one knows what could be making it not spawn that would be a big help.
Edit2: Ok I got it to work with
vehicleOrigin = [(position player select 0), (position player select 1) - 500, (position player select 2)]; myVehicleArray = [vehicleOrigin, 180, "BMP3", EAST] call bis_fnc_spawnvehicle; myVehicle = myVehicleArray select 0; myVehicle doMove (position player);
Thanks for all the help.
-
Hello all.
I am trying to make a mission were you can call in a vehicle with full crew and it will travel to you and stop, then you will have some options to use when near it. First thing i need to know is how to use "position player" with "BIS_fnc_spawnVehicle" with out it crushing me to death (as that is rather counter productive to the mission). I also need to know how to make the vehicle leave and then delete itself, and last but not least (i cant really do much with out this one) how do i use a script to name the vehicle i spawn? I know this seems like a lot but i have been at this for a long time and have had no luck. Can anyone help me out here? Many thanks to anyone who can.
this is what i have so far
_unit = [position player, 180, "BMP3", EAST] call bis_fnc_spawnvehicle; _unit doMove (position player);
as you can see it spawns it right on top of me... I need it not to do that. Also i had a much more complex script to start out with this is just the most simple way i found.
-
I have gone though every thing for SPON Money but i still can not seem to find what could be making the shop stop selling. Any one have a clue?
-
Well i have the HoloMap working very well. its not hard to get working you just need CBA Spon Core and the Holomap addon. Here is what you have to do to get it working.
1. pick something small to use as the map projector (i used the ACE sandbag) name it holoMapMobileHQ
2. create the item you want to have as the map generator and name it mobileHQ1
3. put down a 3ed object called mobileHQPC and in its int wright
this setPos [(getPos this) select 0, (getPos this) select 1, ((getPos this) select 2) + 0.9]
now save
4. make an init.sqf and inside place
["DEBUG_CLIENT_SERVER"] call compile preprocessFileLineNumbers "SPON\Core\initCore.sqf"; [] call compile preprocessFileLineNumbers "SPON\HoloMap\initHoloMap.sqf"; [holoMapMobileHQ, {mobileHQ1}, 1000, 1, west] call SPON_Holo_projector;5.Make a stringtable.csv and inside put
LANGUAGE, "English" #include "SPON\Core\stringtable.csv"
6.Make a description.ext and inside wright
#include "SPON\Core\ui\core.hpp"
7.copy the Spon Core and Spon Holomap script folder into you mission.
8.And that should be every thing, it should now work and you should see the area and all friendly units around your mobileHQ1. tell me if it works for you or if i left something out.
Edit: to also show enemy on the map as red dots add this to your init.sqf
// Infantry. SPON_Holo_showInfantry = true; // Show infantry on map. SPON_Holo_showEnemyInfantry = true; // Show enemy, as well as friendly infantry (ignored unless SPON_Holo_showInfantry is true) SPON_Holo_showNonGroupLeadersInfantry = true; // Shows all infantry, not just group leaders (ignored unless SPON_Holo_showInfantry is true)
-
Ok, Befor you think that i am a total noob i know this is an arma mod, but i have got it working in arma2... kinda i have everything working but one thing. When ever i have more money than any item is worth the shop script stops working and you can no longer see how much money you have nor can you buy/sell anything. Any one got any ideas on what could be wrong? here is a link to Spon Core and Spon Money if any one wants to take a look at them and try to see what the issue could be (http://www.armaholic.com/page.php?id=2397)
(http://www.armaholic.com/page.php?id=2393) NOTE! you need CBA to get the SPON Core addon to work.
-
Ok. so i got my money and shop working (here is the script if any one want to see it nothing to complex)
1.
MYmoney = 1000
2.(this is were the fun happens)
if (Mymoney < 250) then { Hint "You do not have enough money"; } else { Mymoney = Mymoney -250; mygunlocker_1 addWeaponCargo ["AK_47_M", 1]; mygunlocker_1 addMagazineCargo ["30Rnd_762x39_AK47", 5]; Hint "You got an AKM and five mags"; };What i need help with now is a give money command. This is what i have, can any one tell me how to fix it
_target = cursorTarget; if (Mymoney < 250) then { Mymoney = Mymoney - 250}; if (_target == !Alive) then { _target Mymoney = Mymoney + 250};Thank you in advance for help.
-
can any one tell me if this script can be set to use money? and if so how? i seem to be stumped.
if (rating Player < 25) then { Player groupChat "You do not have enough money"; } else { Player addrating -25; mygunlocker_1 addWeaponCargo ["ItemWatch",1]; Hint "THE WEAPON IS NOW IN YOUR GUN LOCKER AT YOUR CAMP"; }; -
I found a script that was kinda what i was looking for but after picking it apart I can not seem to find how he did his shops so its back to where i started from.
-
sorry did not need to post this read the last post please
-
Hello, for some time now i have been looking and trying to make my own money and shop script for arma 2 and so far have had no luck. The type of script I am trying to make is a money script where you gain money over time and a shop script that will let you look at a menu to pick what weapons and things you want. Is there any script like this or tutorial that I can see to help me with this? Thank you in advance for any help you can offer.
Dialog ctrlText issue
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted · Edited by MadranLamont
ctrlSetText = [161, "hello"]; _text = ctrlText 161; class test { name=test; idd=1; movingEnable=1; controlsBackground[]={BG1, BGF1}; objects[]={}; controls[]={InputTest1, button1}; class InputTest1:RscEdit { idc=161; colorBackground[]={1,0,0,0}; x=0.4; y=0.375; w=0.164705882352941; h=0.0416666666666667; }; class button1:RscButton { onButtonClick = if (_text = "hello") then ("ExecVM ""thing3.sqf"""); idc=162; text="close"; colorBackground[]={0,1,0,0}; x=0.4; y=0.458333333333333; w=0.141176470588235; h=0.0833333333333333; }; class BG1:RscBackground { idc=-1; colorBackground[]={1,1,1,1}; x=0.4; y=0.333333333333333; w=0.282352941176471; h=0.416666666666667; }; class BGF1:RscBgFrame { idc=-1; colorBackground[]={1,1,1,1}; x=0.4; y=0.333333333333333; w=0.282352941176471; h=0.416666666666667; }; };This is just the last thing i have tried, but the other ones i have done have not worked ether, and trust me i am sure i have this all sorts of messed up.