Home   Help Search Login Register  

Author Topic: The bugged command thread  (Read 11455 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
The bugged command thread
« on: 29 Jul 2005, 08:33:06 »
I want to start this thread to gather information (or receive solutions) about bugged commands.
Some commands in the command reference do cause a conflict when you save the game. Btw, this is not the savegame bug I'm talking about, the game doesn't crash when this happens.

To start with an other kind of bug :
Quote
combatMode

Operand types:
grp: Object or Group
Type of returned value:
String
Description:
Combat mode of given unit ("BLUE","GREEN","YELLOW","RED")

Bug : Return is only correct when you call setcombatmode in a script or trigger. This means when you change the combatmode via the ingame radio actions (7- 1 to 7), return of combatmode  is incorrect.


Quote
SCRIPTED WAYPOINTS TYPE
http://www.armaeditingcenter.com/forum/index.php?topic=13884.0
Works, but when you save the game, waypoint status is lost.

Quote
DisableAI

Operand types:
unit: Object
section: String
Type of returned value:
Nothing
Description:
Disable parts of AI behaviour to get fine control over unit. Section is one of "TARGET" (disable watching assinged target), "AUTOTARGET" (disable independed target assigning and watching unknown targets), "MOVE" (disable movement).

Example:
soldierOne disableAI "Move"


I know when you use DisableAI "move" and you save the game, the unit starts moving again. Simple way to get EnableAI...
I dunno if this happens with  DisAbleAI "AUTOTARGET" or DisableAI "TARGET"

Quote
animate

Operand types:
object: Object
[animation, phase]: Array
Type of returned value:
Nothing
Description:
Process animation on object. Animation is defined in config file. Wanted animation phase is set to phase.

Example:
house animate ["doors1", 1]

Use the example above, save the game and your door is closed again...

Ok , these are the ones I've found, if you know other ones, please tell me because I want to know them too.

PS :Keep this thread strictly to the subject, please. Maybe we can make it sticky after a while...or send a list to BIS to correct this in a patch  :) (dreaming is free, no?)




« Last Edit: 19 Oct 2006, 12:38:49 by Planck »
Search or search or search before you ask.

bdfy1

  • Guest
Re:The bugged command thread
« Reply #1 on: 29 Jul 2005, 12:36:05 »
Quote
SCRIPTED WAYPOINTS TYPE
What is this ?

Offline Blanco

  • Former Staff
  • ****
« Last Edit: 19 Oct 2006, 12:39:31 by Planck »
Search or search or search before you ask.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:The bugged command thread
« Reply #3 on: 29 Jul 2005, 13:18:17 »
Better yet, why not call this the 'BISd scripting functions thread'
::)

createVehicle
- created object is not created on the given position (=misplaced)

saveGame
- too much global variables corrupt the savegame file

setObjectTexture
- after reloading a saved game setObjectTextured textures disappear

time
- time elapsed since mission start, resets to 0 (zero) when loading a saved game

animationPhase
- will always return the value 0 (zero) on dedicated servers

setDamage
- when a vehicle is repaired on a reapir truck (or whatever) the vehicle gets a damage value of 1.4013e-45. If setdamage 0 is issued on the vehicle after that the damage value stays as 1.4013e-45 (research by Killswitch :) )

loadFile
- doesn't 'support' comments...


And many many more I don't remember right now...
I think the only functions that are not 'BISd' are in and player... ;D ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:The bugged command thread
« Reply #4 on: 06 Aug 2005, 01:15:27 »
# stuck


We'll figure out what to do with this in due course.    In the meantime consider it a temporary sticky and add any information you think is relevant.
Plenty of reviewed ArmA missions for you to play

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:The bugged command thread
« Reply #5 on: 16 Aug 2005, 08:33:54 »
setface
showMap
showCompass
showWarrant (?)
showWatch (?)
showPad (?)


Results of these commands are lost after loading a savegame. The ones with (?) next to them are unconfirmed, but I'm guessing they work like their bretheren.

Also check this thread here for more bugs:

http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=84afa340b97a1a1a530e42a397fd8f04;act=ST;f=7;t=47190;hl=reporting+errors
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:The bugged command thread
« Reply #6 on: 19 Aug 2005, 04:26:53 »
createVehicle
- created object is not created on the given position (=misplaced)
This isn't a bug, it's a feature.  Think of all the CTI games where vehicles spawned on top of eachother...would be aweful.  It's great they are "moved" to a clear area.  A way to fix this is to just setpos the newly created vehicle.

Another "bug"...if you createunit a soldier and then moveindriver the guy, if you then command him to move to another position within the vehicle...those positions aren't listed.  They have to be instructed to get out of the vehicle and get back in again.

Doolittle

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:The bugged command thread
« Reply #7 on: 19 Aug 2005, 10:42:26 »
I think it is a good idea to get all these together in one place, but they should also be added as comments in comref under the appropriate command.  I suggest that at some point a cross-check be done between what we have here and what is in comref to ensure they are both aligned.

My initial contribution:

1. name  
Ceases to work a few seconds after the death of the unit.

2. buildingPos
Returns incorrect values after an abort - resume.  

3. Not so much a command - but a bug none the less:  Armoured units that have no artillery shells (HEAT or SABOT) cannot rearm correctly from a standard ammo truck.

4. objectname setPos getPos objectname
Can result in the object moving a significant proportion of its own size sideways.

5. triggername setPos [x,y,z]
Will result in the trigger being placed Z above sea level not Z above ground level which is what would happen for all other objects.

6. getPos
getPos of an object that is inside, or over the top of a building will return a height that is measured from the nearest floor vertically down from the object, and not the height from ground level.  It could be argued this is not a bug but it does create inconsistencies:
unit setPos [getPos unit select 0, getPos unit select 1, 3.5]
Will put the unit on the middle floor of those houses that have three floors.  Then:
getPos unit select 2
will then return a number very close to 0 being the height of the unit above the floor it is on.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:The bugged command thread
« Reply #8 on: 19 Aug 2005, 11:05:37 »
Yes in the fullness of time we (by which of course I mean you  ;D) will disseminate this information.   At the moment we're just collecting it and comments thereon.    We all know how fickle this game is, what appeared to be a bug to one person in one circumstance, may appear different to somebody else in another circumstance.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:The bugged command thread
« Reply #9 on: 19 Aug 2005, 11:43:43 »
 ;D
I had a manager once that gave all the work to the smart alecs that suggested it.  It seems he was not alone.  ;D

Indeed one person's bug can be another person's design feature.  Case in point:
If a loon has used up all his mags exept the one in his weapon, if he is then killed, the only way the player can pick up that mag is to pick up the weapon and take it out.  Realistic, but a pain in bum.
« Last Edit: 19 Aug 2005, 11:44:17 by THobson »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:The bugged command thread
« Reply #10 on: 19 Aug 2005, 18:26:10 »
Quote
1. name
Ceases to work a few seconds after the death of the unit.
This is probably due to the dead unit being switched by the game engine to a static object a few secs after the unit has died...

Quote
This isn't a bug, it's a feature.  Think of all the CTI games where vehicles spawned on top of eachother...would be aweful.  It's great they are "moved" to a clear area.  A way to fix this is to just setpos the newly created vehicle.
Ok, every single bug could be argued that it's a feature ::)

IMO it is a bug since you give exact coordinates to where the vehicle should be created and it's not created there...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:The bugged command thread
« Reply #11 on: 19 Aug 2005, 18:37:03 »
As long as we're getting really nit-picky...  ;D

Quote
loadFile
- doesn't 'support' comments...

It does: with the "comment" command. It does not remove // or /* comments, for good reason though: that is the point of the preprocessfile command. This way you can use loadfile for other things than just functions, like loading text from a textfile (to be displayed in a dialog, for example), and not have to worry about it deleting your text because it thought it was a comment.

One very real and annoying bug, however, is that the preprocessfile command doesn't work from scripts placed inside of an addon! (Or is it you just can't preproccess the scripts that are inside the addon...)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:The bugged command thread
« Reply #12 on: 19 Aug 2005, 19:14:52 »
Quote
It does: with the "comment" command.
Quite... Forgot that completely :)

But isn't that a bit hinky since you basicly need to waste the good'ol resources by using a function that tells OFP the next string is going to be a comment instead of anything else.. :P ;D

Quote
(Or is it you just can't preproccess the scripts that are inside the addon...)
I'd bet this one...

Sometimes it can work if you use blah=preprocessFile "..\pboname\func.sqf"...
I haven't been that lucky, but that may be because I had the sqf in a subfolder in the pbo...

Of course if you are making a total conversion mod for example you can preprocess the sqf inside the OFP main scripts.pbo, even if the sqfs are in subfolders...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

UNN

  • Guest
Re:The bugged command thread
« Reply #13 on: 21 Aug 2005, 03:56:42 »
Quote
time
- time elapsed since mission start, resets to 0 (zero) when loading a saved game

That comes in quite handy, I believe it's the only way to tell (all be it, longwinded) if a saved games been loaded. If they fix this, they should make sure all addon\scripts\mission init events are called when a save game is loaded. Then apply all the saved variables, to make sure nothing gets reset.

Quote
Another "bug"...if you createunit a soldier and then moveindriver the guy, if you then command him to move to another position within the vehicle...those positions aren't listed.  They have to be instructed to get out of the vehicle and get back in again.

I think this might be a feature. As a player you only get access to all positions if you get in as Commander?

Quote
Can result in the object moving a significant proportion of its own size sideways.


What sort of objects? Static objects work in multiples of 25 meters, when using setpos. But not when placed in the editor.

Quote
1. name  
Ceases to work a few seconds after the death of the unit.

It's probably freeing up the name to be used by another AI, later on?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:The bugged command thread
« Reply #14 on: 31 Aug 2005, 09:30:27 »
That comes in quite handy, I believe it's the only way to tell (all be it, longwinded) if a saved games been loaded.
True...
Comes in handy when using for example setObjectTexture which also gets funked by loading a saved game...
Checking whenever time is close to 0 and re-applying setObjectTexture you have setObjectTextured parts that stay setObjectTextured...
« Last Edit: 31 Aug 2005, 09:30:56 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:The bugged command thread
« Reply #15 on: 12 Sep 2005, 00:44:11 »
UNN:
Quote
Can result in the object moving a significant proportion of its own size sideways.


What sort of objects? Static objects work in multiples of 25 meters, when using setpos. But not when placed in the editor.

Any object that you can place inthe map..  Place a wire, an ammo crate - anything on the map.  Give it a name say thing  then run the code

thing setPos getPos thing

Keep repeating this and you will see it move across the map.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re:The bugged command thread
« Reply #16 on: 25 Sep 2005, 21:26:54 »
onMapSingleClick
This command is definitely bugged.

Try the following:
Put a marker on the map called "markPos" and a single unit.

init.sqs
Code: [Select]
onMapSingleClick {[_pos] exec "onMapClick.sqs"}
onMapClick.sqs
Code: [Select]
onMapSingleClick {}
_pos = _this select 0
"markPos" setMarkerPos _pos
onMapSingleClick {[_pos] exec "onMapClick.sqs"}
exit


Run the mission and start clicking on the map. Even with slow deliberate clicks, eventually it stops accepting single map clicks.
« Last Edit: 25 Sep 2005, 21:29:12 by Mr.Peanut »
urp!

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:The bugged command thread
« Reply #17 on: 26 Sep 2005, 04:18:06 »
Actually mate, it must be your computer because I just used your code and got up to fifty clicks before I got bored and stop. Worked every time.  ::)
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

UNN

  • Guest
Re:The bugged command thread
« Reply #18 on: 26 Sep 2005, 05:35:54 »
Quote
Any object that you can place inthe map..  Place a wire, an ammo crate - anything on the map.  Give it a name say thing  then run the code

thing setPos getPos thing

Keep repeating this and you will see it move across the map.

Yeah, only static objects. As you said ammo crates seem to move by X+0.3 & Y+0.2. Houses by 3.9 & -2.0. Regular units and vehicles are uneffected. The 25 meters I mentioned was with Hawks Nimtiz, sections. Not had chance to check the base class for these.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:The bugged command thread
« Reply #19 on: 26 Sep 2005, 09:04:15 »
The amount of X and Y movement depends on the orientation of the object.  Objects actually move sideways so if you turn it through 90 degrees the X movement will become a Y movement and vice versa.
« Last Edit: 26 Sep 2005, 09:04:42 by THobson »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:The bugged command thread
« Reply #20 on: 26 Sep 2005, 21:28:30 »
Quote
onMapSingleClick
This command is definitely bugged.

I tried your code today as well Mr Peanut.

Everything worked beautifully even after 501 clicks.


Planck
I know a little about a lot, and a lot about a little.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:The bugged command thread
« Reply #21 on: 26 Sep 2005, 23:22:55 »
501? Wasn't that taking it a little too far?!?  ;D

Dedicated loons  ::)  ;D
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline bdfy85

  • Contributing Member
  • **
Re:The bugged command thread
« Reply #22 on: 27 Sep 2005, 08:42:18 »
Commands "enemy" and "friendly" seem to be nt worky at all - but at least it mentioned in russian comref.
Besides I can't get commands : "sideEnemy","sideFriendly", "countEnemy" to work properly.
But countFriendly works...
See the  example attached.
« Last Edit: 27 Sep 2005, 08:43:04 by bdfy85 »
Liberation Mod scripts&balance

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:The bugged command thread
« Reply #23 on: 27 Sep 2005, 11:48:06 »
I don't think "enemy" is a command as such, it is the side of a renegade unit.    (One that has killed too many friendlies and is therefore enemy to all units.)   In other words it is a value returned by other commands.     I suspect "friendly" is similar, but opposite obviously.   Perhaps that can be achieved with setCaptive true, dunno.

sideEnemy and sideFriendly are not listed in the online comref.   However,

countEnemy
countFriendly
countSide

do exist.
Plenty of reviewed ArmA missions for you to play

Offline bdfy85

  • Contributing Member
  • **
Re:The bugged command thread
« Reply #24 on: 27 Sep 2005, 14:40:11 »
Quote
However, countEnemy countFriendly countSide do exist.

But do they work ?  That is the question :)
Liberation Mod scripts&balance

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:The bugged command thread
« Reply #25 on: 27 Sep 2005, 15:51:13 »
countSide works, I used it in a mission once.  
Plenty of reviewed ArmA missions for you to play

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re:The bugged command thread
« Reply #26 on: 27 Sep 2005, 17:30:29 »
Must be my computer then... dammit...!
But it is still a bug to me.

501? Wasn't that taking it a little too far?!?  ;D

Dedicated loons  ::)  ;D
urp!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:The bugged command thread
« Reply #27 on: 28 Sep 2005, 00:13:24 »
Quote
sideEnemy and sideFriendly are not listed in the online comref.

I do believe there is also a sidelogic, which is also not listed in any comrefs.

Don't ask me what it does, if anything.


Planck
I know a little about a lot, and a lot about a little.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:The bugged command thread
« Reply #28 on: 01 Oct 2005, 19:11:30 »
Setposing a unit off a ladder is bugged. As soon as you setpos him he goes away for a split second then goes right back to the ladder.

Also during a cutscene if you are on a ladder and you push up or down your unit moves around even though its a camera scene.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:The bugged command thread
« Reply #29 on: 01 Oct 2005, 19:37:27 »
Quote
Also during a cutscene if you are on a ladder and you push up or down your unit moves around even though its a camera scene.

Hmmm....Interactive camera scenes.   ;D


Planck
I know a little about a lot, and a lot about a little.

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:The bugged command thread
« Reply #30 on: 06 Oct 2005, 08:53:08 »
If you setPos a "mine" object, it will set itself to the absolute Z value.  Meaning if mine is at [x, y, 0], it will actually be at sea level inside the ground (you should just see its shadow).

If you setVelocity an ammo crate (which doesn't make it move by the way ;)), you won't be able to pick up anything from that crate even though it gives you the option to do so.  (Took forever to find this.)

Doolittle

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:The bugged command thread
« Reply #31 on: 06 Oct 2005, 18:47:02 »
If you setPos a "mine" object, it will set itself to the absolute Z value.  Meaning if mine is at [x, y, 0], it will actually be at sea level inside the ground (you should just see its shadow).

If you setVelocity an ammo crate (which doesn't make it move by the way ;)), you won't be able to pick up anything from that crate even though it gives you the option to do so.  (Took forever to find this.)

Doolittle

Can you setPos mines? I thought they can't be. I tried to setPos a standard mine and I couldn't get it moving anywhere :P and when I try to get a mine's position using hint format["%1",getpos mine] it only displays text "array".

Maybe BIS didn't mean that you should use setVelocity on an ammo box? If it even doesn't move when you try it. Well anyway it can be a bug if you say so :)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:The bugged command thread
« Reply #32 on: 06 Oct 2005, 20:09:24 »
setVelocity not 'working' is due to the different simulations (found in the config, like simulation="tank";) or different classes as there are a few object types that can't be setvelocitied..
Usually they are static objects, houses etc...
Some objects can be setVelocitied after they have been 'pushed' first by creating a bullet and hitting the object with that bullet and then using setVelocity...

Also, if you setVelocity an object that has no geometry it will move pretty weirdly, usually doing the opposite you setVelocity it to do..

And yeah, I'm wondering that mine bit as well.. :)
Mines are very peculiar thing as they don't really exist in any level...
But that's too off-topic ;)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:The bugged command thread
« Reply #33 on: 06 Oct 2005, 21:14:06 »
Mines placed in the Mission Editor cannot be setPossed.

Mines created by camCreate can.   (although they go to sea level ... IIRC they are stuck there, but I'm not sure.)

Can you imagine how hard it was finding that one out?  ;D

I know this is technically a bugged command thread, but I think we can allow a bit of discussion about bugged objects.   Or perhaps you could construe it as a bug in setPos, even though it isn't really ......
« Last Edit: 06 Oct 2005, 21:15:55 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:The bugged command thread
« Reply #34 on: 07 Oct 2005, 16:13:24 »
Well so long as we are dealing with bugged objects as well.

Sound objects cannot be created, deleted, moved or turned off.  But they seem to turn themselves off after a time.

The climb ladder action in the three floor buildings will not be available after a save and restart, or it may be a combination of several save and restarts and long mssion time.

Back to commands:
Deleting a unit that is in a vehicle is only partially successful.  It seems to remove any capability of accessing the unit (name, setPos etc.) but the body stays in the vehicle and there is no way to get it out.  Also any {killed} Event Handler will still fire if they are subsequently killed.  I don't know about other EHs
« Last Edit: 07 Oct 2005, 16:15:04 by THobson »

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:The bugged command thread
« Reply #35 on: 11 Oct 2005, 07:37:17 »
I found if something is in a vehicle and you setPos it anywhere...even on itself, it will move outside the vehicle.  So if I want to delete someone I setPos them ontop themselves first just in case they were inside a vehicle.

On the same note, if you are in CARGO and you setPos yourself somewhere else, you will have a little number icon by your name still...as if you were still in vehicle but you don't see the vehicle icon anymore in the top right of that bottom row.  I haven't figured out a way to fix this.

Doolittle

UNN

  • Guest
Re:The bugged command thread
« Reply #36 on: 12 Oct 2005, 13:54:48 »
Quote
On the same note, if you are in CARGO and you setPos yourself somewhere else, you will have a little number icon by your name still...as if you were still in vehicle but you don't see the vehicle icon anymore in the top right of that bottom row.  I haven't figured out a way to fix this.

Yeah, setposing units straight out of a vehicle will screw up it's AI. Use the getout or eject action first then setpos them, otherwise OFP thinks there still in the vehicle.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re:The bugged command thread
« Reply #37 on: 18 Oct 2005, 03:48:28 »
This is not a bug per se, but certainly an annoyance.  Neither the GETIN nor GETOUT eventhandlers  fire when a player changes positions within a vehicle.  This makes it impossible to addActions you want only to be visible to the driver of a vehicle, using only event handlers.
« Last Edit: 27 Oct 2005, 16:57:12 by Mr.Peanut »
urp!

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:The bugged command thread
« Reply #38 on: 27 Oct 2005, 02:05:19 »
I don't know if this is a feature or a bug but vehicle assignment commands (assignasdriver) do not work on yourself or your group if you are a group leader.  Therefore you cannot script this to speed the process up.
--Ben

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re:The bugged command thread
« Reply #39 on: 31 Oct 2005, 14:35:01 »
setDir does not work on triggers.  If you setDir and then getDir a trigger it will return the angle you specified, but the trigger orientation does not change.
urp!

LoTekK

  • Guest
Re:The bugged command thread
« Reply #40 on: 06 Dec 2005, 19:56:13 »
Both speed and velocity return incorrect values when used on a unit inside a vehicle. Instead of returning the inherited speed or velocity based on the vehicle's movement, both commands return the speed/velocity of the unit in the instant before it enters the vehicle.

Therefore, if you use moveInDriver while running, for example (just to prove a point), as long as you're in the vehicle, speed and velocity will return your running speed/velocity. Once you exit the vehicle, the commands resume working normally.

In other words, if you want to ensure that the commands always returns the expected value, feed them vehicle unit instead of just unit.
« Last Edit: 06 Dec 2005, 19:58:33 by LoTekK »

Offline raedor

  • Members
  • *
    • VBS2
Re: The bugged command thread
« Reply #41 on: 26 May 2006, 11:11:00 »
In MP: The eventhandler engine gives back false on all clients, where the vehicle is not local, no matter if the engine is on or off. You can easily "fix" it:
Code: [Select]
_vehicle addEventHandler ["fired", {[_this select 0, isEngineOn (_this select 0)] exec "myScript.sqs"}"]

Pim

  • Guest
Re: The bugged command thread
« Reply #42 on: 28 May 2006, 09:30:16 »
Quote
4. objectname setPos getPos objectname
Can result in the object moving a significant proportion of its own size sideways.

Quote
The amount of X and Y movement depends on the orientation of the object.  Objects actually move sideways so if you turn it through 90 degrees the X movement will become a Y movement and vice versa.

As far as I have experienced this this, the extent of this ocurring depends on the relative difference between the center of mass of the object and the location of the x,y,z-axes origin in the p3d-editor. It seems that BIS has some very extreme differences between these for some objects (e.g., the standard BIS hangar). For most community made addons this problem does not occur at all (or is unnoticable) as the origin has been placed properly. But I agree, the mere fact that this problem is occuring indicates flaws in the setPos/getPos commands.
« Last Edit: 28 May 2006, 09:35:40 by Pim »

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: The bugged command thread
« Reply #43 on: 19 Aug 2006, 04:01:15 »
When a scud missile is set to the launch position (either by the action available when in the vehicle or by use of the action command), after a game is saved and reloaded, the missile will no longer be in the errect position. If the missile is fired the launcher has no missile, but if you save and reload the game, the launcher is "magically" rearmed with a new missile and you can fire it again.