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 / Tier 1 -- Any tricks to recreate of objects?

Author
Message
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 21st May 2019 21:57 Edited at: 21st May 2019 21:59
I have a _world: subroutine which creates my level content, and a displayWorld () function which turns my level visibility on/off

But in my menu stage, I need to recreate the stageFloor at a size defined by the user. So now I have this holy mess where I try to create the stageFloor if it doesn't exist already, and, in another place in my code, recreate it if it does exist, and AGK2 says that object 100020 doesn't exist...

Assuming I can clean up my crazy code, is there any trick to how to deal with objects that need to be recreated at new sizes?

Edit: Sorry about the headline. I know it is offendingly bad.
xtremi
5
Years of Service
User Offline
Joined: 26th Aug 2018
Location:
Posted: 22nd May 2019 08:17
Well what about using SetObjectScale to the scale you need? Is stageFloor one object?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd May 2019 08:24
SetObjectScale
and
SetObjectScalePermanent

that is fine if its one object
if for example you've created it in blender and its made of multiple objects you may need to join them in blender (ctrl-j I think)
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 22nd May 2019 13:49
setObjectScale worked fine, thanks! (The stageFloor is simply a box generated in-game, so it doesn't have any extra objects or anything.)

Login to post a reply

Server time is: 2024-04-25 15:14:10
Your offset time is: 2024-04-25 15:14:10