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 / Giving Objects Names

Author
Message
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 12th Jul 2005 05:41
in stead of
load object "gun.x",1
can i
load object "gun.x",ak47

or any other object for that matter
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 12th Jul 2005 08:51
that's really easy, in the very begining of your code type

Global ak47=1

it may not work because it has numbers in it, but I know letters will

I discriminate against discriminating people....
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 12th Jul 2005 09:35
That works. Or you can use

#Constant ak47 = 1

The main difference is that #Constant does something similar to a Find/Replace when you compile the code so no extra memory is used during run-time. Global uses a memory space during run-time. It's an insignificant difference, but that's it.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 12th Jul 2005 10:47
Excellent


Thanks alots you guys
now let me ask of another question DIM???
I mean I understand they hold information like a charaters traits
so would dim be like a class in c++
but how are they used what kind of trait and sence there info for charater are they used in a function and then for thatshould most things like healh ammo shooting ect. be used as a function
sorry to knock you down but an outline would be great
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 12th Jul 2005 11:47
Globals and constant dont work in DBC btw

Word.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 12th Jul 2005 22:30
Neo I think youre getting ahead of yourself, you still have a lot to learn and youre rushing into even harder things, I'd keep it simple untl you have the engine complete and then start packaging it all into functions and whatnot. Just a suggeston.


Current Projects: SHADE - Game Maker | Mecho - TGC Puzzle Entry | Halo Physics Engine | COLD - Polygonal Collision Detection
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 12th Jul 2005 23:04
I agree with you Ruccus the reason im asking is just to get an idea what functions are used for cause i see where some times shooting is in the main code then i see somtimes where its a function and just trying to understand a function more so i know what i can and canot use as a function and the reason for the dim ? is i have some what of a fps character not the model but the engine purpose, and for instant pickup limb in your tut., since that is like a part of the charaters doings shoutl it be in dim or for charater purpose what is dim used for. and also the varible name for an object because i notice in games you may have 3 enemy that look the same . so that means same model so if i program a game where i have

load object"enemy.x,1" since there is only on object how are there
3 of the same in the game
would you
load object"enemy.x",1
load object"enemy.x",2
load object"enemy.x",3
and if so then using the intersect command to shoot
you would have to right one for each object thats the same
so cant you just give the enemy a name eny#
so when you shoot as a function mabey it checks to see
what eny# = two so it will know
cause if not thats alot of intercet commands you would have to do
i need an idea please
and besides how can you load more of the same object unless you give it a name
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 12th Jul 2005 23:06
i will wait untill i finish the engine to pack every thing into function just curriuos of what i was getting into with these questions
Vequor
19
Years of Service
User Offline
Joined: 27th Apr 2005
Location: Mars
Posted: 12th Jul 2005 23:22 Edited at: 12th Jul 2005 23:27
Easy.

ak47=1
load object "gun.x",ak47

You just specify a variable to equal a number, like shown above. Using that things become much easier to keep track of(at least for me they do). That should work in Pro and Classic. Try it.

Stay calm and keep a cool head
Neotech
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 12th Jul 2005 23:35
Thank Vequor, Thas accually another reason i asked.

Thanks....

Login to post a reply

Server time is: 2024-11-27 22:31:10
Your offset time is: 2024-11-27 22:31:10