OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: mathias_eichinger on 22 Jul 2009, 21:06:43

Title: Setting the height of an object: Broken in Arma2?
Post by: mathias_eichinger on 22 Jul 2009, 21:06:43
Hey, lads, just tried to setpos a notebook on a table by using:

Quote
this setPos [(getPos this select 0),(getPos this select 1),1];

but it does nothing, the notebook remains firm on the ground.


Any ideas what I am doing wrong?


Thank you

Mathias
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: Worldeater on 22 Jul 2009, 21:33:47
Hrrm, the code runs fine (checked with "Klapptisch" and "Notebook").  ???
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: mathias_eichinger on 22 Jul 2009, 22:06:43
Strange, this is exactly what I am trying to achieve....only that the Notebook remains on the ground only to jump on to the Klapptisch once shot at.
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: laggy on 23 Jul 2009, 17:29:49
Not sure if this relates to your problem, but I've had similar issues with a setpos and setVectorUp combination, where the object simply couldn't be setpos's inside another object, a powerGenerator inside a building in my case.

The powerGenerator refused to be put partly under the floor at the same time as it was not aligned with the ground. Weird... don't know, annoying... yes.
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: nominesine on 23 Jul 2009, 19:20:53
I don't know what a klaptish is, but I've noticed one thing. Some objects are designed so that you can put other things on top of them, without falling through. Certain tables have this function for instance. Otherwise radios and other stuff would just sink to the floor after being setPosed. Now, if you try to set a brittle object like a radio on such a table, and miss the height by a fraction of an inch, so that the radio is partly inside the table, the radio will sometimes fly away in arandom direction. Try setPosing the object a couple of inches above the surface, and it will usually sink down to the ciorrect position. I noticed this in OFP. Don't know if it's still a valid observation in ArmA2.
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: Worldeater on 23 Jul 2009, 19:23:15
Klapptisch == FoldTable (http://www.armatechsquad.com/ArmA2Class/Objects/furniture/full/FoldTable.jpg)
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: Planck on 23 Jul 2009, 19:39:01
Your link produced the following error with SeaMonkey Worldeater:

Redirect Loop
Redirection limit for this URL exceeded.  Unable to load the requested page.  This may be caused by cookies that are blocked.


Planck
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: DeanosBeano on 23 Jul 2009, 20:02:42
I don't know what a klaptish is, but I've noticed one thing. Some objects are designed so that you can put other things on top of them

 This is very true and is also true when you try attachto with certain objects , i believe the folding table was one of the objects that i could not attachto ,meaybe wrong in this instance but there are seeming some classes that dont like setpos and attachto.

 
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: savedbygrace on 23 Jul 2009, 23:58:37
The more I hear the more I dislike. My favorite commands..setpos and setvectorup, nearly useless?
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: Planck on 24 Jul 2009, 00:16:58
Nawwww, it works fine.

I just tried it with a road cone and a folding table.

Named the table 'mytable', and put 'this setPos [(getPos mytable select 0),(getPos mytable select 1),1];' in the road cones init field.

Placed the road cone in the same position as the table in the editor and then previewed in the editor, result was a road cone on top of the table.


Planck
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: savedbygrace on 24 Jul 2009, 01:04:48
But what of vehicles. Can they be setpositioned? In the terrain? Or did BIS revert to the old OFP object collision deal?
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: Planck on 24 Jul 2009, 01:17:38
You mean like this:------------

Of course, if you get in and drive it, it will pop back up to the surface, just like in OFP.



Planck
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: savedbygrace on 24 Jul 2009, 05:03:56
Cool. Thats nice to know. Thanks Planck. Might wanna call a wrecker to get that twactor out of the mud now.
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: laggy on 29 Jul 2009, 21:58:15
I just find it very annoying that units die a rather agonizing death if you happen to setpos them a couple of inches too high in a building, at least some buildings, haven't tried them all.

The stay levitated in the air, moaning and complaining even though nothing is touching them (except air) until suddenly, they die and shut up.

Looks rather funny, though I doubt this was intended by BIS.

Laggy
Title: Re: Setting the height of an object: Broken in Arma2?
Post by: Kremator on 30 Jul 2009, 00:59:49
I've read somewhere there is a code that stops that collision.  I believe it is used in things like Warfare base construction etc.  Not sure if it's in the new RTE by ionos.