When combined with the right registered event code, this code will swap a ship’s primary weapon from one side of the ship to the other on each shot:
(objSetItemProperty gSource (objGetProperty gSource 'selectedWeapon) 'pos
(list
(subtract
360
(@
(objGetItemProperty gSource (objGetProperty gSource 'selectedWeapon) 'pos)
0
)
)
aeRadius
)
)
However, replacing the (list
with '(
will cause the first shot to fire from the correct position and all subsequent shots to fire from (0 aeRadius)
.
nms 9 Jul 2017:
'(...)
is a shortcut for (quote ...)
, not (list ...)
. So if you make that substitution, you're passing a list where the first item is a list that begins with "subtract".
george moromisato 21 Jul 2017:
@nms is correct. The quote character is used when you don't want to evaluate the arguments in the list. The list
function is used when you do.
Resolve
Archive
Reopen
Create
Edit
Save
Attach File
Cancel Edit