Jump to content
somenoob240

Creating Vehicle Spawn Menu with Specific Vehicles

Recommended Posts

Hello,

I'm very new to Arma 3 scripting. I'm trying to figure out how selections in a dialog work (I'm just using the GUI editor via debug menu), and how pulling certain vehicles to assign to each selection (then spawning at marker) would work. Figured I'd ask since I'm not really sure what to even search for. If my prior knowledge of basic HTML coding is correct I'd need to assign some kind of variable to the selected item(s) then pass that to the spawn script, but I just don't know how that works with Arma's code 😛

 

What I've got so far is my defines and all the code from the dialog I needed to paste into a file, plus the description.ext. 

 

Anything helps! Cheers.

  • Like 1

Share this post


Link to post
Share on other sites

I don't have any specific help for you at the moment, but here are some handy bookmarks for you:

https://community.bistudio.com/wiki/SQF_Syntax

https://community.bistudio.com/wiki/Category:Scripting_Commands

https://community.bistudio.com/wiki/Category:Arma_3:_Functions

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers

https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers

 

Also, check the pinned topics in this subforum, most notably the Scripting Introduction and Scripting Guides posts.

 

Good luck, have fun!

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Harzach said:

I don't have any specific help for you at the moment, but here are some handy bookmarks for you:

https://community.bistudio.com/wiki/SQF_Syntax

https://community.bistudio.com/wiki/Category:Scripting_Commands

https://community.bistudio.com/wiki/Category:Arma_3:_Functions

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers

https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers

 

Also, check the pinned topics in this subforum, most notably the Scripting Introduction and Scripting Guides posts.

 

Good luck, have fun!

Checked them out, found a bunch of useful stuff. Only issue I've got now is I have no idea how assigning a value (in this case classnames) to a variable that isn't simply just text.

 

For example I've got:

_charger10 = 
	{
	lbAdd [1500, "Dodge Charger '10"]; 
	lbSetData [1500, _index, "Fox_Charger10"];
	};

Not sure if that's the right formatting to use to execute multiple lines of code in one var.

Edited by somenoob240
typo correction
  • Like 1

Share this post


Link to post
Share on other sites

Also, I've been trying to figure out how to use the cursor selection to assign the index value to the lbSetData lines, but I don't know how to do that since the way I'm trying to do it is:

while {true} do
	{
		_index = lbCurSel 1500;
		_vehicleSel = lbData [1500,_index];
	};

Should I execute before or after defining the other variables?

  • 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

×