Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Can't delete terrain and rebuild

Author
Message
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 14th Jan 2007 22:40
I am currently writing a golf game. I build a terrain into object one. When the hole is complete, I want to delete the current terrain but do not see the command. I get a physics error when trying to create next level. Yes, I have tried phy clear. No results. Also, there are also all kinds of commands I see in the physics demo, but I can find them in help files anywhere. Why is this? I see other commands that begin with something other than phy &*%%^$.

Help appreciated


Richard
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 15th Jan 2007 00:16
Terrains are just standard DBP objects so you should be able to just delete it as you would any other body, unless I'm mistaken.

Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Jan 2007 00:28
Its a two stage process

1st delete the Rigid Body

phy delete rigid body 1

Then delete the object

delete object 1

hope this help

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 15th Jan 2007 01:01 Edited at: 15th Jan 2007 01:06
That code is already in my coding granted it generates no errors, unless I have phy clear in there. Still, when i repeat the identical code for the next hole with different heightmaps and bitmaps, I get a terrain already exist physics error I believe.
Also, I have tried delete terrain 1, but get a terrain does not exist error even though the previous error says it does exist.


Richard
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 15th Jan 2007 13:09
O.K. I'm going to work now, but by the time I get home, someone better have an answer for me.(Ha!Ha! I wish) Why can I not delete a physics terrain that has been built so I can rebuild it.


Richard
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 15th Jan 2007 16:29
Try the DESTROY TERRAIN <terrain ID> command
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 15th Jan 2007 22:39
I tried destroy terrain 1 and still no results. It doesn't hilight like the rest of my commands, yet it returns no error. Where do you find these commands at. I would love to know the resource.


Richard
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 16th Jan 2007 12:43
O.K. This is my last cry for help. Hasn't anyone ever tried to delete a physic terrain object and rebuild it? Why can't I? This blows away any ability to program multiple levels.
I even tried building a second/different physic rigid terrain and still get a physics error. What, only one terrain allowed?


Richard
JerBil
19
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 16th Jan 2007 17:10 Edited at: 16th Jan 2007 17:23
Make two terrains using the PHY MAKE command with a file name, say
ScapeA for the first and ScapeB for the second
Use a third variable, say Land that can be set to either terrain.
The PHY LOAD command is pretty fast, so once you have both terrains
built and saved, you're good to go.
Notice that both terrains are loaded at the same time, but only
the currently visible one will be active.

EDIT: I've included a simple example. To see the second terrain,
click the mouse. You can move the cube with the arrowkeys. Actually,
the terrain in this example is huge, 18 miles on a side.


Terrain switch:


Ad Astra Per Asper

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 00:28:11
Your offset time is: 2024-03-29 00:28:11