Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

design help

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey, i already posted about this in the game development forum but it doesnt seem like anyone reads that part of the forum.

but basicly what im trying to do is make it so when i click a sprite it goes into a state of "activated" and while in this state if the user gets certaint amount of pixels away it will throw sprite off in that direction.

the problem is that when i run my game and click the sprite it freezes my mouse(sprite) inside the sprite and does nothing. heres my code...

//inside main class
//on collision between mouse sprite and other sprite


//inside the sprite class (thing i want to click)



it doesnt seem to ever reach into the if(!ZenGame.leftClick){
[ February 20, 2006: Message edited by: Evan Pierce ]
 
Evan Pierce
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok ive come to the conclusion that whats happening is that when i move my mouse away from the sprite there is no longer a collision so it cant run the if(!leftClick). does anyone have any ideas to how i might implement this to get the desired effect?
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic