• Advertisement
Sign in to follow this  

BlitzBasic not changing a variable?

This topic is 2063 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


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

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
Sign in to follow this  

  • Advertisement