[Questions] another Fail... :D

07/06/2012 16:38 romeoromeo#1
well .... im trying to code new source( everybody does now ,so im trying ... ) .
coded Npc Item Monster client map
each is a class has no relation to another
the question is ... how can i put those as an Object for Map class :D
no code needed . just hint what should i do .
07/06/2012 18:00 I don't have a username#2
What do you mean?
07/06/2012 18:46 Zeroxelli#3
From the looks of it, he created an NPC with the lookface of a monster. He wants to make it a map object or static object instead.
07/06/2012 18:59 Korvacs#4
I think its much simpler than that, he just wants to store objects on a map, such as monsters, players, npcs, items etc.
07/07/2012 00:44 I don't have a username#5
His usage of words confuses me, seriously. I don't think he even understand the words he's using rofl.
07/07/2012 09:54 shadowman123#6
Quote:
Originally Posted by romeoromeo View Post
well .... im trying to code new source( everybody does now ,so im trying ... ) .
coded Npc Item Monster client map
each is a class has no relation to another
the question is ... how can i put those as an Object for Map class :D
no code needed . just hint what should i do .
Well All i understood from This is :-

You Coded Npc , Items , Monster , Client , Map as Ceparate Classes that arent connected to each other and you asking How to connect them with each other so u can use em .. Here You Are

In Client Class you can make Smthing like that

Code:
Npc NewInstance;
This would Allow you to use the Npc Class inside Client One And Dont forget to set NewInstance to New Npc(); once u would like to use it
07/07/2012 12:49 I don't have a username#7
Quote:
Originally Posted by shadowman123 View Post
Well All i understood from This is :-

You Coded Npc , Items , Monster , Client , Map as Ceparate Classes that arent connected to each other and you asking How to connect them with each other so u can use em .. Here You Are

In Client Class you can make Smthing like that

Code:
Npc NewInstance;
This would Allow you to use the Npc Class inside Client One And Dont forget to set NewInstance to New Npc(); once u would like to use it
Not when he wants to use it, but when his class is initialized, hence why constructors exist.
07/07/2012 17:09 romeoromeo#8
Greetings , thanks for all who replyed ...
exactly like Korvacs explained .
how to store (npc , mob , client , flooritem) as objects on map .
incase if i want to count all objects on map (for example ) i count all as map_object Not as npc + mob + ...........

i think i found the answer ........ which is :
make class object and inherit from it for all (player, mob , npc ... )
if that is it ... then
#request close ...
07/07/2012 19:33 shadowman123#9
Quote:
Originally Posted by romeoromeo View Post
Greetings , thanks for all who replyed ...
exactly like Korvacs explained .
how to store (npc , mob , client , flooritem) as objects on map .
incase if i want to count all objects on map (for example ) i count all as map_object Not as npc + mob + ...........

i think i found the answer ........ which is :
make class object and inherit from it for all (player, mob , npc ... )
if that is it ... then
#request close ...
Hmm Inherting 4 Classes ?? Y So you could set Instances from their Classes then use em Insted of Inherting ...idk which is better but thats what came into my mind anyways GL Dude