ID:151239
 
Ok, I have a 2 questions this time...
1) In my last post, I asked how to make my mob bigger, well I put in the code and I got 3 errors:
bin.dme:28:error:icon:badvar
bin.dme:29:error:headType:bad var
bin.dme:25:error::invalid expression

any idea's why?

And question #2:
How do I make it so when a character kills a creature, he gets exp eventually leading to leveling up and increasing HP and the choice of new stats and techniques? Ebonshadow can probably answer this because he made that awesome DBZ spar game, thanks a mil,
Gilser
Ok, I got the code to compile, but now It won't let me BE the guy, I can place lil animated pics of him everywhere but I can't be him and control him.

I still need help with question no. 2 though...
In response to Gilser
Ok, I got the code to compile, but now It won't let me BE the guy, I can place lil animated pics of him everywhere but I can't be him and control him.

Make sure you have world.mob set to the same type as the player mob. For example:

world
mob = /mob/human //This defines the default mob created for new players


I still need help with question no. 2 though...

Check out this discussion... plenty of useful ideas!

Experience and stuff
In response to Guy T.
On 1/25/01 11:01 pm Guy T. wrote:
Ok, I got the code to compile, but now It won't let me BE the guy, I can place lil animated pics of him everywhere but I can't be him and control him.

Make sure you have world.mob set to the same type as the player mob. For example:

world
mob = /mob/human //This defines the default mob created for new players

Ok, I tried this but It's still not working, now I can't even make other mods work...help...PLEASE???
In response to Gilser
Ok, I tried this but It's still not working, now I can't even make other mods work...help...PLEASE???

Hmm... try posting some of the code you're using and I'll take a look this evening.
In response to Gilser
Sorry it took me so long to respond, been busy...Here's the code
// DM Environment file for bin.dme.
// All manual changes should be made outside the BEGIN_ and END_ blocks.

/*Players/Turfs/Objects*/

world // default world parameters
mob = /mob/player//This defines the default mob created by players
turf = /turf/ground

/*Player Stats*/

mob/player


Gilser
icon = 'Mod.dmi'


//The mob shows legs and waist; the "head" object shows the torso and head.
var/obj/head/head
var/headType

mob
//The mob shows legs and waist; the "head" object shows the torso and head.
var/obj/head/head
var/headType

New()
.=..()
if(headType)
head = new headType(get_step(src, NORTH))

Move()
.=..()
if(. && head)
if(!head.Move(get_step(src, NORTH), dir)) head.loc = null

human
icon = 'humanBottom.dmi'
headType = /obj/head/human_head

obj/head
layer = MOB_LAYER + 0.1
density = 0

human_head
icon = 'humanTop.dmi'

obj/itemsandsigns
flutz
icon = 'flutz.bmp'
heaven1
icon = 'LostHeaven1.dmi'
heaven2
icon = 'LostHeaven2.dmi'
post1
icon = 'post1.dmi'
post2
icon = 'post2.dmi'
post3
icon = 'post3.dmi'
post4
icon = 'post4.dmi'
turf/ground
tile
icon = 'ground.bmp'
grass
icon = 'Grass.dmi'
space
icon = 'space.dmi'
dtile
icon = 'dtile.dmi'
/*People can chat */

mob/verb/say (msg as text)


world << "[usr]: [msg]"

/*Creata characters*/
world
mob = /mob/player

mob/player
New()
world << "Creating a new player"
return ..()

Login()
usr << "[usr.key] logs in"
return ..()


// BEGIN_FILE_DIR
// END_FILE_DIR

// BEGIN_INCLUDE
#include "OS.dmp"
// END_INCLUDE
In response to Gilser
Okay... for one thing, you should probably put all of your code (that is, anything that isn't in the BEGIN_**** blocks) into a separate .dm file. This makes your code much more modular and a heck of a lot easier to use.

As for the actual question at hand, I don't have much help... sorry. Not that I couldn't answer (there's a chance I might not, though), but I'm pressed for time right now. =P
In response to Spuzzum
On 1/29/01 6:52 pm Spuzzum wrote:
Okay... for one thing, you should probably put all of your code (that is, anything that isn't in the BEGIN_**** blocks) into a separate .dm file. This makes your code much more modular and a heck of a lot easier to use.
Ok, I didn't catch that...do you mean I should put all the different sections of the code into different files EX:

turf/ground
grass
icon = 'grass.dmi'
tile
icon = 'tile.dmi'
ect.
ect.
in one .dm file then something like

obj/characters
Gilser
icon = 'Gilser.dmi'

into a different .dm file?
Sorry with all the questions, I'm only 13 and it's a little hard to learn all this stuff. ;)
In response to Gilser
On 1/30/01 12:15 pm Gilser wrote:
Ok, I didn't catch that...do you mean I should put all the different sections of the code into different files EX:

Yes, you don't want to store your code in the .dme file. That's really reserved for BYOND housekeeping.

You can create code files by using the File-New command. How many files you use it completely up to you...personally I tend to have a Game.dm file for my central game functionality, a mob.dm file for the basic mob code, a player.dm file for player-specific stuff.

Whatever makes it easy for you to find what you want.
In response to Deadron
Yes, you don't want to store your code in the .dme file. That's really reserved for BYOND housekeeping.

You can create code files by using the File-New command. How many files you use it completely up to you...personally I tend to have a Game.dm file for my central game functionality, a mob.dm file for the basic mob code, a player.dm file for player-specific stuff.


In that case, do I put all my code files in the same folder? Does that make it so they all go together? Sorry for all the Q's...
In response to Gilser
On 1/30/01 4:29 pm Gilser wrote:
Yes, you don't want to store your code in the .dme file. That's really reserved for BYOND housekeeping.

You can create code files by using the File-New command. How many files you use it completely up to you...personally I tend to have a Game.dm file for my central game functionality, a mob.dm file for the basic mob code, a player.dm file for player-specific stuff.


In that case, do I put all my code files in the same folder? Does that make it so they all go together? Sorry for all the Q's...

Just create them using File->New in DreamMaker and that will take care of it for you. You can have them in subfolders if you want but you probably don't need to.