PDA

View Full Version : Editing/Scripting



SNKMAN
May 28 2009, 23:21
Well so far there is no Editing/Scripting section so i will post it here.

Game Logic:


Looks like Game Logics can not moved ( setPos ) any longer.
I do used Game Logics to create a move point.

Example:


_group = _this select 0;

_logic = "Logic" createVehicle [0, 0, 0];

_logic setPos (getPos player);

_group move (getPos _logic);



setCaptive:


Units which do use the setCaptive command are now on side civilian.

Example:


player setCaptive True;

if (side player == civilian) then {hint "Damn it im supposed to be a soldier!"};

MulleDK19
May 28 2009, 23:23
I don't like the thought that you're using game logics for this.

Use markers or "H (invisible)" instead.


Btw.. Check out locations. Might be exactly what you're trying to do with game logics.

http://community.bistudio.com/wiki/createLocation



Also, I don't get why you want to do:

_group = _this select 0;

_logic = "Logic" createVehicle [0, 0, 0];

_logic setPos (getPos player);

_group move (getPos _logic);


When you can just do


_group doMove getPos player
or

_group move position player

?????


PS: I prefer doMove as it will make the unit move to the position, where as move creates a waypoint for the unit. (Unless of course, you're building a path)

SNKMAN
May 28 2009, 23:36
Yes the part with the logic was just an example.

Of course i would never do something like that. :D

Well i use addWaypoint (http://community.bistudio.com/wiki/addWaypoint) instead of a logic.

MulleDK19
May 28 2009, 23:47
Yes the part with the logic was just an example.

Of course i would never do something like that. :D

Well i use addWaypoint (http://community.bistudio.com/wiki/addWaypoint) instead of a logic.

Why do you need to create anything to move them?

Why not just move them with doMove?

SNKMAN
May 29 2009, 00:05
Becouse i need a object that is setPost with a random value every time i call it.

And then let the group move to it.

MulleDK19
May 29 2009, 01:38
Becouse i need a object that is setPost with a random value every time i call it.

And then let the group move to it.

Why not just:

_group doMove [random 3000, random 3000, 0]
?????

Maddmatt
May 29 2009, 01:38
Becouse i need a object that is setPost with a random value every time i call it.

And then let the group move to it.
Can't you use a waypoint for that?

Strange that gamelogics can't be moved though.

EvilNate
May 29 2009, 01:43
Is there a way to see the list of possible respawn options with A2? You know, like bird, base,group, etc?

Placebo
May 29 2009, 08:48
Moving to the shiny new editing/scripting forum :)

SNKMAN
May 29 2009, 18:16
Why not just:

_group doMove [random 3000, random 3000, 0]
?????

Well i know all thouse way's how to let a unit/group move from A to B it wasn't a request to tell me how to slove this problem.

The only reason, why i started this thread was to let the community know about some new command behaviours.


Helicopter Landing:


The command "Get In" was changed to "GETIN"

I think its the same goes for "GET OUT" use "GETOUT" instead.

Dr_Eyeball
May 30 2009, 05:39
Thanks for the reports. These "Differences from Arma" tips are very useful. Keep them coming.

d3nn16
May 30 2009, 06:30
Can someone who got the game test if the commands getMarkerShape and getTriggerArea exist ? Thanks

HitmanFF
May 30 2009, 07:01
Can someone who got the game test if the commands getMarkerShape and getTriggerArea exist ? Thanks
Sorry, but the answer seems no on both accounts.

Edit: There is a command MarkerShape and TriggerArea, so the answer is yes after all :)

SNKMAN
May 30 2009, 07:36
Warning!


In .sqf a missing ";" at the end of a line will not be reported/dispayed as an error.

The script simply will stop working from this line.


findCover:


Looks like the command findCover (http://community.bistudio.com/wiki/findCover) do not work any longer.

Dr_Eyeball
May 30 2009, 09:31
I think it's just markerShape (without 'get' prefix) & triggerArea based on extracted list (http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2) on Biki. (Edit: Didn't see your edit.)
The missing semi-colon ';' was sometimes the same in Arma too.

Spooner
Jun 1 2009, 21:07
Sorry to add to the pedantry, but you can't use this any more:


_logic = "Logic" createVehicle [0, 0, 0];

In A2 you have to use:


_logic = "Logic" createVehicleLocal [0, 0, 0];

or


_logic = (createGroup sideLogic) createVehicle ["logic", [0, 0, 0], [], 0, "NONE"]


EDIT: and, what I forgot to say, is that I've had no problems setPosing either type.

SNKMAN
Jun 1 2009, 22:13
Yes you are right Spooner. ;)

Thanks for pointing that out.

Well another BIG problem i found:

If you have errors in your syntax then there is no error message showing, that something is wrong!

Example:


if alive player) then
{
hint "player is alive";
};


Now you should get a error message, telling you that a "(" is missing in front of alive.
But there is nothing shown.
Scripts simply stops working from the point the error was made.

Same goes to every other kind of syntax error.

Spooner
Jun 1 2009, 23:37
Yeah, I think that came in with 1.01beta (bad, bad idea if it isn't a bug!). Until they fix it, use a log viewer (with tail), like LogExpert (http://www.log-expert.de/download.html), to watch what is happening in RPT!

Mike84
Jun 2 2009, 10:54
When I played the MP campaign with a friend in 1.00, there were literally 100's of script error messages popping up, so I assume BIS just disabled error output in the game to make it look like they fixed a lot of error in the campaign.

Thanks for suggesting LogExpert there spooner :)

mr.g-c
Jun 2 2009, 11:00
When I played the MP campaign with a friend in 1.00, there were literally 100's of script error messages popping up, so I assume BIS just disabled error output in the game to make it look like they fixed a lot of error in the campaign.

Thanks for suggesting LogExpert there spooner :)
Haha, yeahh that would make absolutely sense! :rolleyes::j: :D

Sickboy
Jun 2 2009, 11:21
:D

Added to DH Knowledge Base: http://dev-heaven.net/wiki/heaven/Handy_links#File-Viewers

Spooner
Jun 2 2009, 11:23
@<hidden>: That makes frightening sense. Make people think things were fine while simultaneously make it harder for community scripters...

Missing error messages ticketed (http://dev-heaven.net/issues/show/1721) at DH.

d3nn16
Jun 2 2009, 14:28
Concerning mp game lobby, are there more than 2 parameters available to set up or still the same ?

Do commands addMagazineCargo, addWeaponCargo, clearMagazineCargo and clearWeaponCargo have global effects now ?

Spooner
Jun 2 2009, 15:47
The example missions still put lots of actual parameters into just 2 physical parameter boxes, so that doesn't sound promising.

IceShade
Jun 3 2009, 20:00
Looks like creating the Logic works fine, Spooner. I can't seem to put them in vehicles anymore, though, like in ArmA1? There goes my dummy model for filling up/disabling vehicle slots..