Jump to content


Photo

FPS walls


  • Please log in to reply
14 replies to this topic

#1 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:17 AM

In gamemaker studio beta i am making a 3d game. I've done the coding but for some reason my walls haven't elavated. I used the FPS tuturial by game maker to help me but it still dosen't work. They just apear on the floor as there sprites and i have the textures for them. Sombody please HELP!!!!!!!!!!!!!!!!!!!!!!!
  • 0

#2 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:21 AM

this is my ob ject wall basuc fatal error for my wall basic object
___________________________________________
FATAL ERROR in
action number 1
of Draw Event
for object Obj_Basic_wall:

############################################################################################
VMError!! Occurred - Push :: Execution Error - Variable Get tex
at Object.Obj_Basic_wall.Draw.0 (line -1) - <unknown source line>
############################################################################################

and my code is:

{
d3d_draw_wall(x1,y1,z1,x2,y2,z2,tex,1,1);
}
  • 0

#3 ND4SPD

ND4SPD

    GMC Member

  • GMC Member
  • 2175 posts

Posted 10 April 2012 - 10:22 AM

Hi! Welcome to the forums! :)
First, this problem may belong in the Novice Q&A section. Generally, that's where people ask questions and get help.
Secondly, when you're posting a problem, be sure to include as much detail as is relevant! In this situation, for example, you may post a screenshot of whats going wrong, and at the very least, the code that is causing problems. We can't see what may be wrong without seeing the code!!

EDIT: Oops, you've posted the code now. Ninja'd :P are you sure there isn't any other code? The error message is helpful, but I'm surprised that there isn't more there...

Edited by ND4SPD, 10 April 2012 - 10:23 AM.

  • 0

#4 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:31 AM

The code to my walls under 'Create' is:

{
x1 = x-16;
x2 = x+16;
y1 = y;
y2 = y;
z1 = 32;
z2 = 0;
tex = background_get_texture(Wall);
}
  • 0

#5 ND4SPD

ND4SPD

    GMC Member

  • GMC Member
  • 2175 posts

Posted 10 April 2012 - 10:37 AM

What happens if you change the drawing code to:
{
tex = background_get_texture(wall);
d3d_draw_wall(x1,y1,z1,x2,y2,z2,tex,1,1);
}
That MAY solve it. I've only seen textures used in this way, where the tex variable is reassigned a value every drawing step.
  • 0

#6 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:39 AM

still dosen't work:



___________________________________________
FATAL ERROR in
action number 1
of Draw Event
for object Obj_Basic_wall:

############################################################################################
VMError!! Occurred - Push :: Execution Error - Variable Get z2
at Object.Obj_Basic_wall.Draw.0 (line -1) - <unknown source line>
############################################################################################
  • 0

#7 ND4SPD

ND4SPD

    GMC Member

  • GMC Member
  • 2175 posts

Posted 10 April 2012 - 10:42 AM

{
tex = background_get_texture(wall);
d3d_draw_wall(x-16,y,0,x+16,y,32,tex,1,1);
}

Try that?
  • 0

#8 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:45 AM

The walls are in there original sprite but on the floor in 2d. No texture. I think you're getting closer thought as at least i can see where the walls are supposed to be
  • 0

#9 ND4SPD

ND4SPD

    GMC Member

  • GMC Member
  • 2175 posts

Posted 10 April 2012 - 10:47 AM

I have no idea why it was having problems with those variables :S

Would you mind posting a screenie?

Are there other walls or floors that are drawing correctly or otherwise? Perhaps there's a problem with the camera, and with setting the perspective?
  • 0

#10 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:50 AM

how do u do that?
  • 0

#11 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:51 AM

it only lets you do it from websites?
  • 0

#12 ND4SPD

ND4SPD

    GMC Member

  • GMC Member
  • 2175 posts

Posted 10 April 2012 - 10:52 AM

Post a screenshot? Press print screen, past from the clipboard into an image editor, and then save the image. From there, you need to upload the image to an online image host, such as imageshack.us. That site will give you a link to the file, and BBCode to add the image to a forum post. Use that code, put in in your reply to this topic, and hit Add Reply! :)
  • 0

#13 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 10 April 2012 - 10:58 AM

http://imageshack.us...pleasehelp.png/
  • 0

#14 ND4SPD

ND4SPD

    GMC Member

  • GMC Member
  • 2175 posts

Posted 10 April 2012 - 12:19 PM

pleasehelp.png :P

OK, the only thing I can think of is the texture sizes may be off... that is, they need to be powers of two, like 16x16, 256x128, and so on. Or at least they used to be. But I don't work with Gamemaker Studio, so that may not be a problem.

Sorry, mate! I tried :P
  • 0

#15 _259388

_259388

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 12 April 2012 - 08:17 PM

thanks for trying but yeah they are powers of 2 :cool:
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users