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.

Newcomers DBPro Corner / A couple newb questions...

Author
Message
GMX
19
Years of Service
User Offline
Joined: 19th Sep 2005
Location: In front of my monitor
Posted: 29th Sep 2005 04:45
Ok, I have a couple questions:

1. Is there a way I can make multiple "instances" of an object WITHOUT them having a different object number? So then I would be able to call upon them all. For example if I had 4 of a certain type of enemy and I wanted to make them all do the same thing. Does it have to do with types? Because BlitzBasic had types, so I know what they are and how to use them, but BlitzBasic also had the each keyword that could be used in for loops to call upon all of the instances of that type. (note that instance object function in DBPro must give the new obect a new object number, this is not what I want)
2. Is there a way to destroy a single instance (instance being defined as above) of an object?
3. Is there a way to destroy every object?
4. How can I make one object to change the .x file that it is using?
5. How would I make a background? I tried using texture backdrop but it said "error, that command is obsolete"?

Or am I just spoiled from using gamemaker lol...

I may have more questions later. Sorry, but I'm a newb, so I will be asking questions a lot...

Hey, I'm still a newb, so expect lots of questions from me.
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 29th Sep 2005 10:55
1 no, all objects are seperate entities, you write your own manager, read up on for/next and arrays if you want to group em or use types

2 yes..see above

3 yes

for i=1 to objmax
if object exist(i) then delete object i
next i

4 delete it and load a new one or load the new one then delete the old one and clone from the new one (faster)

5 make a huge sphere or box, set object cull to 0 and texture it

yes



we know where area 51 is, but where are areas 1 to 50?, and what do they do there?.
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 29th Sep 2005 17:04
Also for #3 you can use this command

Delete Objects startNum,endNum

(so if you want to delete objects 1 through 10000 you would do this


--Peter

"We make the worst games in the universe."

Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 29th Sep 2005 21:54 Edited at: 29th Sep 2005 21:54
@Peter: curses , I thought there was a command like that, but when I tried it I put delete object 1,10 and it gave an error so I thought it had been removed .#



why do they say Aliens are gonna be friendly?, surely the agressive ones wipe out the peaceloving ones, so all you have left out there are crazed flesh eating interstellar monsters.
GMX
19
Years of Service
User Offline
Joined: 19th Sep 2005
Location: In front of my monitor
Posted: 29th Sep 2005 23:00 Edited at: 29th Sep 2005 23:30
Thanks for all your help

@Me!: for the answer to #4, I have 2 questions: what do you mean by "one"? And all I want to do is give the same object a different mesh, I don't want to have to position it all over again
And for #5 what does object cull do so I know for the future?



Thanks,
GMX

EDIT: Ok, I tried making my own system for cataloging all the pumpkins in my game. It works ( ) but...well, here is what I did (sorry, it's kind of long):



For some reason, there's only a camera collision with the first pumpkin. What's wrong?

Hey, I'm still a newb, so expect lots of questions from me.
Heckno
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location: Palm Coast, FL
Posted: 1st Oct 2005 21:03 Edited at: 1st Oct 2005 21:20


change to



Quote: "@Me!: for the answer to #4, I have 2 questions: what do you mean by "one"? And all I want to do is give the same object a different mesh, I don't want to have to position it all over again
"


same object different mesh, I don't understand the reasoning behind this... if you make the positioning values a variable you could easily change out objects without changing positioning values

expand a bit more or your reasoning as to why you want to switch to a different mesh cause I don't know if we are talking about the same thing...
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 1st Oct 2005 21:14 Edited at: 1st Oct 2005 21:19
object cull can be turned on or off, if it is on then any polygons facing away from you are not drawn to help preserve the framerate, if its on then you can see the inside of your skysphere, normaly you wouldn`t since if you are inside a sphere then you are looking at the back of the faces, so the system would assume they where unseen and cull them, giving an object a negative size has the same effect.

you either load a new object with the same number or append object animations, so walking would be frames 1 to 10, crouching 11 to 23, idle 24 to 40 etc, then you use play object with the start and end number of the frame sequence you want, so for example if you have an object 1 that just walks and the last animation frame is 12, and you have the die animation in another file called death.x then you would do

append object "death.x",1,13

notice that the frame number is higher than the last frame in the frames the object already has, if you try to overwrite an existing frame you will get an error, then you just use the play object or loop object command with the start and end numbers of the frames you want to play, you can use "total object frames" to find the last frame number of the object you are currently playing, so you can work out how many frames the newley loaded animation has by subtracting the old total from the new total number of frames.



why do they say Aliens are gonna be friendly?, surely the agressive ones wipe out the peaceloving ones, so all you have left out there are crazed flesh eating interstellar monsters.
GMX
19
Years of Service
User Offline
Joined: 19th Sep 2005
Location: In front of my monitor
Posted: 2nd Oct 2005 20:14 Edited at: 2nd Oct 2005 20:18
@Me!: Thanks, that's what I want

@Heckno: Sorry, that didn't work. setting the response argument of the automatic camera collision just made the collisions "stick", I know what it means I just can't write it here, I'm sure you know it as well.

As I was saying, the first pumpkin actually has a collision with the camera, but all the others don't.

Hey, I'm still a newb, so expect lots of questions from me.
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 3rd Oct 2005 00:26
Quote: "object cull can be turned on or off, if it is on then any polygons facing away from you are not drawn to help preserve the framerate, if its on then you can see the inside of your skysphere"

or when making your skysphere you can just scale it with a negative value...effectivly inverting it

"We make the worst games in the universe."

ThinkDigital
19
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 3rd Oct 2005 04:13
...and thus using half as many polygons
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 3rd Oct 2005 13:46
@Peter_ :-- LOL, you didn`t read very far into that post did you?

Quote: "giving an object a negative size has the same effect"


I said that too



why do they say Aliens are gonna be friendly?, surely the agressive ones wipe out the peaceloving ones, so all you have left out there are crazed flesh eating interstellar monsters.
GMX
19
Years of Service
User Offline
Joined: 19th Sep 2005
Location: In front of my monitor
Posted: 4th Oct 2005 00:30
Does anyone have a possible solution to my other question:

Quote: "As I was saying, the first pumpkin actually has a collision with the camera, but all the others don't.
"




-GMX

Hey, I'm still a newb, so expect lots of questions from me.
Heckno
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location: Palm Coast, FL
Posted: 4th Oct 2005 23:06 Edited at: 4th Oct 2005 23:06


I quess I should have made myself clearer... I have tweaked the code and replaced the pumpkin objects with boxes to show you auto collision with all objects....
GMX
19
Years of Service
User Offline
Joined: 19th Sep 2005
Location: In front of my monitor
Posted: 4th Oct 2005 23:42 Edited at: 4th Oct 2005 23:43
EDIT: Nevermind, I figured it out, when I used instance object instead of just load object it didn't have a collision with the camera...is this supposed to happen?

Hey, I'm still a newb, so expect lots of questions from me.

Login to post a reply

Server time is: 2024-11-27 16:44:08
Your offset time is: 2024-11-27 16:44:08