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.

AppGameKit Classic Chat / Heightmap Delete

Author
Message
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 27th Feb 2019 00:20
Good evening . Could someone please tell me how to delete a heightmap.
createobjectfromheightmap(10,"map.png")
tried deleteobject(10) but that doesn't appear to work.
Thankyou.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 27th Feb 2019 07:52
Also tried clearscreen() sync() this also has no effect.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Feb 2019 07:54
the delete object method works for me could you post an example where it shows it not working
it may help when someone tries to debug the issue your having
fubar
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 27th Feb 2019 09:33
Deleteobject(10) works for me too. The 3D heightmap gets deleted

You don't seem to have enough arguments to create the heightmap in the first place though
createobjectfromheightmap(10,"map.png") needs width, height, length,smoothing etc...
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 27th Feb 2019 14:57
It's fine now but I now have a new problem in which I load a height map delete the height map and then when I try to load a new one it comes up with an error. The strange thing is sometimes it works and sometimes it doesn't . tried it on both my computers and get the same problem. I must of been over it a hundred times. oh well i'll probably work it out eventually. Where I was going wrong with the original problem was it was not the height map that wasn't deleting it was the skybox setskyboxvisable(0) did the trick. I'll try another map for my loading problem maybe that'll sort it . Thanks for the replies . Got to nip out now . have a nice day .
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 27th Feb 2019 16:26
@Pfaber Could you please , just put the minimun functional piece of code reproducing same error . ?
I'm not a grumpy grandpa
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 27th Feb 2019 17:26
CreateObjectFromHeightMap(21,"maze21.png",40960,1700,40960,5,0)
This is the offending piece of code looks fine to me . I've tried using another .png file too same problem.
puzzler2018
User Banned
Posted: 27th Feb 2019 17:34
Wow - thats huge....

The object your creating it on is 21, so doesnt deleteobject(21) do it?
Tier 1 Developer
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 27th Feb 2019 17:44 Edited at: 27th Feb 2019 17:49
Hi there.

Ok ...Let see if this piece of functional code works for you .



Edit...you will have to load an image to apply to your terrain
I'm not a grumpy grandpa
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 27th Feb 2019 19:54
Thanks for the help.

Login to post a reply

Server time is: 2024-11-05 23:21:35
Your offset time is: 2024-11-05 23:21:35