Modify Terrain Via Lua?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Modify Terrain Via Lua?

Post by Noobasaurus »

Is it possible to modify terrain by using lua? Such as, you give the coordinates (x,y) of a location and you set the terrain height to a different number than it is in ZE. Or you give a range of coordinates (x-x,y-y) and then set the height for all of them. Do these functions exist in the lua(if you get what I am trying to say)?

Why do this? After a certain amount of time you may want a land bridge to appear...
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: Modify Terrain Via Lua?

Post by Grev »

I haven't modded in a while, but I don't believe that function exists. There are creative ways to bypass that. I believe you can script the destruction of objects via lua, and you can have that area where the bridge is blocked until that certain object blocking the bridge is destroyed. Don't quote me though.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Modify Terrain Via Lua?

Post by Noobasaurus »

It was just a thought. And yes, I was/am planning a giant bridge there and it will not be there until a certain timer goes off. Sadly, the person who started to make the bridge disappeared...and all I need is a giant rectangular cube...with the length of 7 Kamino bridges.

I did line up 7 bridges but my lua killobject commands didn't want to work, saying they needed entityprop not entity object or something like that. I haven't tested that map for a while.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Modify Terrain Via Lua?

Post by AQT »

You can only kill objects whose ClassLabel support health parameters. See the following for a complete list of destructibles:
Also, when you use the KillObject function, the thing that is being killed should be the name of the object in ZE, not its ODF name.
Post Reply