Jump to content


Photo

A couple problems


  • Please log in to reply
5 replies to this topic

#1 Morning_Fresh_

Morning_Fresh_

    GMC Member

  • GMC Member
  • 55 posts
  • Version:GM8

Posted 28 March 2012 - 10:07 PM

Alright so to start off the first problem is really weird I typed in a simple code to draw a cricle with a radius of a variable(grab_radius) and a line from the player to the mouse. But strangely the code doesn't seem to work. Here's the code I used:
draw_sprite(sprite_index,image_index,x,y)
draw_set_color(c_red)
if grabbed=true
{
draw_circle(x,y,grab_radius,true)
draw_line(x,y,mouse_x,mouse_y)
}
If anybody could tell me why this simple code does not draw then also tell me a solution

My second problem isn't really a problem, more like something that I don't know how to do. So, I want the land around the player to randomly generate around the view as the ship moves. I need to know how a object would be placed not on the view but closely around it. I also need to know how it can differentiate places that haven't be generated and places it can. I realize that this is a huge topic to learn but I hope somebody can help me with it.
  • 0

#2 thegame

thegame

    Flying Penguin

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

Posted 28 March 2012 - 11:09 PM

Is that code in the draw event? If not, then it won't work. If it is... not sure what your problem would be...
Your second 'problem' I also do not know how to do...
  • 0

#3 Morning_Fresh_

Morning_Fresh_

    GMC Member

  • GMC Member
  • 55 posts
  • Version:GM8

Posted 28 March 2012 - 11:17 PM

Is that code in the draw event? If not, then it won't work. If it is... not sure what your problem would be...
Your second 'problem' I also do not know how to do...

It is the draw event
  • 0

#4 thegame

thegame

    Flying Penguin

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

Posted 29 March 2012 - 12:20 AM

The problem is probably that grabbed is not set to true... is the code just not drawing or is it drawing the wrong thing?
  • 0

#5 Morning_Fresh_

Morning_Fresh_

    GMC Member

  • GMC Member
  • 55 posts
  • Version:GM8

Posted 29 March 2012 - 12:34 AM

The problem is probably that grabbed is not set to true... is the code just not drawing or is it drawing the wrong thing?

I i've checked it with a draw sprite event and it worked so it must be the drawing
  • 0

#6 Plastic

Plastic

    GMC Member

  • New Member
  • 28 posts
  • Version:GM7

Posted 01 April 2012 - 06:08 PM

Alright so to start off the first problem is really weird I typed in a simple code to draw a cricle with a radius of a variable(grab_radius) and a line from the player to the mouse. But strangely the code doesn't seem to work. Here's the code I used:

draw_sprite(sprite_index,image_index,x,y)
draw_set_color(c_red)
if grabbed=true
{
draw_circle(x,y,grab_radius,true)
draw_line(x,y,mouse_x,mouse_y)
}
If anybody could tell me why this simple code does not draw then also tell me a solution

...

Is the object visible? If not, the draw-event isn't performed.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users