Jump to content
  • Advertisement
Sign in to follow this  
ccrock4t

BlitzBasic not changing a variable?

This topic is 2187 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

I'm using Blitz3d and I'm making a 2d puzzle game fro practice.

I'm simply trying to make it so if the images touch the button changes color.

If button1 = 1 then the button should be red
if button1 = 2 then the button should be pink

If I set button1 = 2 at the beggining (as opposed to 1) then button will be pink, so it's obviously detecting the variable

Also, when the bullet hits the button, it dissapears, so I know there is a collision happening.

sealy in the y coordinate
sealx is the x coordinate.

[source lang="plain"]For bull.bullet = Each bullet
If bull\sealx = 600 And bull\sealy = 0
Delete bull.bullet
If button1 = 1 Then
button1 = 2
ElseIf button1 = 2 Then
button1 = 1
EndIf
EndIf
Next[/source]

Since the bullet is disappearing, it's obvious the collision is working. But why isn't the bullet drawing?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!