Jump to content


Photo

Background & inventory!


  • Please log in to reply
5 replies to this topic

#1 Occams_Solution

Occams_Solution

    GMC Member

  • New Member
  • 4 posts
  • Version:GM8

Posted 26 February 2012 - 04:28 AM

Hello!

Im going to put two of my problems in here rather than create two topics, itll clutter up the site less :)

First: My background. My game is set in a cave/cavern/underground place and i want the back wall to remain stationry to the world, not to my view. ive tried and scoured the forums but i cant find a case like this D:

Second: Ive got it so that i can place torches. they even have nice lighting :D but i want to be able to have some sort of block selection. This is the code i hoped would work...

if (mouse_check_button_pressed(mb_right))
    {
     if (global.selecteditem) == 1 action_create_object(o_dirt,mouse_x-12,mouse_y-12)
     if (global.selecteditem) == 2 action_create_object(o_grass,mouse_x-12,mouse_y-12)
     if (global.selecteditem) == 3 action_create_object(o_block,mouse_x-12,mouse_y-12)
     if (global.selecteditem) == 4 action_create_object(o_water,mouse_x-12,mouse_y-12)
     if (global.selecteditem) == 0 action_create_object(o_torch,mouse_x-12,mouse_y-12)
    }

that was in my step event for my mouse control.
and this...

global.selecteditem=0

is in the create event of it.
Sadly this time my namesake didnt help :P
thanks for any and all help and i look forward to hearing

Occam.
  • 0

#2 Lotias

Lotias

    GMC Member

  • GMC Member
  • 880 posts
  • Version:GM:Studio

Posted 26 February 2012 - 04:50 AM

First: My background. My game is set in a cave/cavern/underground place and i want the back wall to remain stationry to the world, not to my view. ive tried and scoured the forums but i cant find a case like this D:


So just add it to the room and leave it as is? What exactly are you trying to do?

As to your second problem, you haven't described what exactly isn't working or what is happening.
  • 0

#3 Occams_Solution

Occams_Solution

    GMC Member

  • New Member
  • 4 posts
  • Version:GM8

Posted 26 February 2012 - 09:31 PM

First: My background. My game is set in a cave/cavern/underground place and i want the back wall to remain stationry to the world, not to my view. ive tried and scoured the forums but i cant find a case like this D:


So just add it to the room and leave it as is? What exactly are you trying to do?

As to your second problem, you haven't described what exactly isn't working or what is happening.


Ah... sorry... When i add the background to the room as normal it seems to be following the character, as in it will move x+3 if the player moves x+3, its probably just a check box i cant find lol :/

Ok, in theory when i right click it should spawn an object, right? but i dont want it to spawn only one type of object. So if i press '1' and right click it will make a torch whereas if i press '2' then click it should creat a dirt object... it doesnt D: it only ever places torches... thanks!

Occam
  • 0

#4 gman5500

gman5500

    GMC Member

  • New Member
  • 86 posts
  • Version:GM8

Posted 26 February 2012 - 09:47 PM


First: My background. My game is set in a cave/cavern/underground place and i want the back wall to remain stationry to the world, not to my view. ive tried and scoured the forums but i cant find a case like this D:


So just add it to the room and leave it as is? What exactly are you trying to do?

As to your second problem, you haven't described what exactly isn't working or what is happening.


Ah... sorry... When i add the background to the room as normal it seems to be following the character, as in it will move x+3 if the player moves x+3, its probably just a check box i cant find lol :/

Ok, in theory when i right click it should spawn an object, right? but i dont want it to spawn only one type of object. So if i press '1' and right click it will make a torch whereas if i press '2' then click it should creat a dirt object... it doesnt D: it only ever places torches... thanks!

Occam

If it is okay to use D&D i have made a quick example:

http://www.mediafire.com/?1wk1m0xtxqca9jw

Also it is my example so dont upload it >.<

EDIT: this is inventory not background

Edited by gman5500, 26 February 2012 - 09:51 PM.

  • 0

#5 Lotias

Lotias

    GMC Member

  • GMC Member
  • 880 posts
  • Version:GM:Studio

Posted 26 February 2012 - 10:57 PM

Ah... sorry... When i add the background to the room as normal it seems to be following the character, as in it will move x+3 if the player moves x+3, its probably just a check box i cant find lol :/


But what do you want the background to do? It is completely static in the room when you add it as normal- when the view moves, the background stays. Did you want the background to remain static with the view, or what?
  • 0

#6 Occams_Solution

Occams_Solution

    GMC Member

  • New Member
  • 4 posts
  • Version:GM8

Posted 27 February 2012 - 05:50 PM

Gman5500, that is great thanks! D&D isnt my preferred method but it works really well here! and the showing of the icon is good too, i know you said not to upload it but i assume if i take it apart i can copy bits of it into my game...? *crosses fingers* lol and Lotias: in the example gman gave me i just made a background and it does stay static, i dont know what ive done to make it follow the camera D: thanks for putting up with me tho lol >_<

Occam.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users