Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Spawning a set of props so they keep their shape

3 posters

Go down

Spawning a set of props so they keep their shape Empty Spawning a set of props so they keep their shape

Post by TemplarGFX Mon 06 Feb 2017, 10:42

Hey All,

So quick question because its driving me up the wall and Im giving up on this side project if someone can't tell me how this is done.

Basically I have a set of props called "bunkerset"  and suprisingly its a bunker.  Its got a floor made of cargo containers (stacked) and other bits and bobs.

I'm spawning it with

Code:

OFP:spawnEntitySetAtLocation("bunkerset", position[1], position[2], position[3])

When it spawns, the container-floor is about 2 meters to high, the concrete barriers are about 0.5 meters too high, and its just over-all screwed.
I tried setting them as "from ground" and "from sealevel".  made 0 difference

The objects are not "dropping to ground" and they shouldn't seen as OFDR can't do that, but I am like 10000% sure you can spawn a complex entity set and it keep its shape, thats how all those custom buildings worked.  So... what the F am I missing here?

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Spawning a set of props so they keep their shape Empty Re: Spawning a set of props so they keep their shape

Post by tvig0r0us Mon 06 Feb 2017, 13:10

If I recall correctly, spawning an entity set forces the members of the set to spawn on a plane situated at the y-position in the spawn location. When you activate an entity set, it appears exactly as it is situated in the editor. I ran into this problem when I was working on the SLT 2 experiment and ended up having to write routines that would go through the entity set xml and rewrite the locations of all of the objects relative to a center point, then activate the set so it would appear as I built it in the game. Unfortunately, this does not work for multiplayer games as the entity set appears in the game where ever the file locations are and does not affect the client machines. This I'm afraid is a shortcoming of the game.

When TJDagger created those standing bunkers and towers, he would create entity sets that represented different levels of the structure on level planes and then spawn in all of the entity sets at relative heights to create the entire thing.

--tvig
tvig0r0us
tvig0r0us
Admin

Location : Nky
Points : 266
Reputation : 29
Join date : 2013-10-16

http://www.moddb.com/members/tvig0r0us

Back to top Go down

Spawning a set of props so they keep their shape Empty Re: Spawning a set of props so they keep their shape

Post by TemplarGFX Mon 06 Feb 2017, 13:13

tvig0r0us wrote:If I recall correctly, spawning an entity set forces the members of the set to spawn on a plane situated at the y-position in the spawn location. When you activate an entity set, it appears exactly as it is situated in the editor. I ran into this problem when I was working on the SLT 2 experiment and ended up having to write routines that would go through the entity set xml and rewrite the locations of all of the objects relative to a center point, then activate the set so it would appear as I built it in the game. Unfortunately, this does not work for multiplayer games as the entity set appears in the game where ever the file locations are and does not affect the client machines. This I'm afraid is a shortcoming of the game.

When TJDagger created those standing bunkers and towers, he would create entity sets that represented different levels of the structure on level planes and then spawn in all of the entity sets at relative heights to create the entire thing.

--tvig

Oh WOW

ok so it wasn't just me.

I guess no cool looking dynamically spawned bunker Sad

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Spawning a set of props so they keep their shape Empty Re: Spawning a set of props so they keep their shape

Post by TheGeneral Mon 06 Feb 2017, 18:47

the best person I think that might have the answer to this is Tim, but he has been dormant for a long time. 

Remember he made all those bunker sets and towers etc from a mishmash of props and what not. I don't know how he did it, but I think he was  on the track that you are going for. I'll try and find his guide he made to show you.
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Spawning a set of props so they keep their shape Empty Re: Spawning a set of props so they keep their shape

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum