[ToTE] Problem with placing bridges via script

Maps and the art of mapmaking.
User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

[ToTE] Problem with placing bridges via script

Unread postby Jonas » 05 Feb 2009, 22:23

As I said in the subject line I got problem when I try to replace a damaged bridge part with a regular one via script. The new bridge part keeps hovering in the air when the script has run. I keep the new parts on the same level as the others - actually I've placed them on the bridge itself, on the part that's not damaged. I've tried to place them on on different places, just for testing, but it didn't do any different. The script works just fine, it's just the thing with the air-borne bridge parts.

I have seen this been done on other maps but I can't remember witch ones. Any ideas for a solution?

A screen-shot from the editor of the broken bridge[img][img]http://thumbnails11.imagebam.com/2580/427f6025792106.gif[/img][/img]
A screen-shot from the game of the air-borne bridge[img][img]http://thumbnails5.imagebam.com/2580/be086225792107.gif[/img][/img]
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 06 Feb 2009, 08:30

I use a reverse idea on my new map, I'm destroying bridge (replacing regular section with broken), and got the same problem. I did overcame it, but don't remember how exactly (it was a few months ago). I believe the trouble is in WaterBased parameter. You must set it to true in order for the bridge sections to move right.

ReinierK
Leprechaun
Leprechaun
Posts: 39
Joined: 24 Jan 2009

Unread postby ReinierK » 06 Feb 2009, 08:56

As an alternative (ugly) solution: place the 'fixed' bridge part somewhere on the map that is not (yet) visible. Make sure it's at the correct height and angle...

When you trigger the script, remove the broken part and simply move the fixed part into it's new location... I don't know if theis actually works, but you could try it.

Also: ik looks like you've lowered the z vlaue of the bridge to make it connect easily to the land, I don't think this is the intended way to use a bridge... AFAIK you should raise the land to make a small ramp towards the bridge, instead of lowering the bridge into the ground.

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 06 Feb 2009, 17:38

Franzy wrote:I believe the trouble is in WaterBased parameter. You must set it to true in order for the bridge sections to move right.
Nope, it didn't make any different. Tried the the TerrainAlignment too.
ReinierK wrote:As an alternative (ugly) solution: place the 'fixed' bridge part somewhere on the map that is not (yet) visible. Make sure it's at the correct height and angle... ...Also: ik looks like you've lowered the z vlaue of the bridge to make it connect easily to the land, I don't think this is the intended way to use a bridge... AFAIK you should raise the land to make a small ramp towards the bridge, instead of lowering the bridge into the ground.
I have stacked the 'fixed' parts on top of the section to the right just to make sure they have the same z-value. I've even tried to put them 'out in the free'.

The first time I made the bridge I had lowered the land and then I put the bridge on its location - it didn't work. Then I restored the water to land again and placed the bridge and after that I used just water tool to lower the land - and here I am now.
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 07 Feb 2009, 03:12

I got it!!!

RazeBuilding is the solution! I just put the 'fixed' bridge in the RazedStatic in the object properties. So easy, but so hard to get there.
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 09 Feb 2009, 08:35

Strange, but I managed to get it working with SetObjectPosition. But your way works too :)

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 09 Feb 2009, 13:53

Franzy wrote:Strange, but I managed to get it working with SetObjectPosition. But your way works too :)
Yea, it worked like a charm. It's too bad though not all objects have a RazedStatic.
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 09 Feb 2009, 14:05

...But you can always create your own objects that have all the properties you need :)

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 09 Feb 2009, 14:21

I know, but I'm still quite new to this :| but things are coming slow, but they are coming :)

I guess you can modify the data.pak and put what ever you want in the the RazeStaticShared folder?
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 09 Feb 2009, 14:28

Maybe this helps. :)
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 09 Feb 2009, 14:45

Thanks Asheera. But I know how to make safe objects and so on. I have not done the re-modeling "deep enough" yet, but I understand that almost anything is possible.

You know, when I'm into my mapmaking I always think - I do that later, I just want to do "this and that" first :creative: , it's bad I know :)
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

ReinierK
Leprechaun
Leprechaun
Posts: 39
Joined: 24 Jan 2009

Unread postby ReinierK » 09 Feb 2009, 16:19

That's actually a good attitude ;-)
Since it gives you the oppertunity to quickly work out ideas and fill in the details later...

I do that too, I'm about to redo about 25% of my first map because my story changed on some parts and now the map needs some adjustment... I never regret that, because it helped me in my "evolution" of the map...

Everything has it's purpose, even it it is (or feels) "negative", you don't wanna know how much designs and stuff I actually deleted, just for the process of coming up with something better.

<EndOfRant>

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 09 Feb 2009, 17:10

Yea, I think that's a part of the progress when you're making your first map - it's so much of a learning process.

Sometimes you feel like working with the story itself and other times you're into details (environment, complicaded scripts etc), it gets a little bit unbalanced. I try to play my map from the beginning from time to time just to see if there are parts that feels dull.
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain

User avatar
Jonas
Conscript
Conscript
Posts: 219
Joined: 14 Jan 2009

Unread postby Jonas » 12 Feb 2009, 03:28

Got another one that's good that I found in the new functions 3.1 post by Franzy

Code: Select all

CreateStatic("bridgeTest", "/MapObjects/Grass/Bridges/Bridges.(AdvMapStaticShared).xdb#xpointer(/AdvMapStaticShared)", x, y, floor, Rot, terrain aligned, scale=100 ) 
Franzys post: http://www.celestialheavens.com/forums/ ... php?t=9728
:leo: A man who carries a cat by the tail learns something he can learn in no other way.
Mark Twain


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 0 guests