Advertisement
ZoriaRPG

Arkanoid Catch Logic

Aug 30th, 2018
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. 1. Each capsule must have lweapon b
  2. 2. Add ball->Misc[CAUGHT]
  3. 3. Add ball->Misc[OLDSTEP]
  4. 3. \
  5.  
  6. 5. In ball.check_hitvaus
  7. if it hits the vaus, check: if ( catch == cancatch )
  8.     then
  9.         if !launched
  10.         b->Misc[CAUGHT] = 1
  11.         b->Misc[OLDSTEP] - b->Step
  12.         b->Step = 0
  13.  
  14.         launched = false
  15.    
  16. in movevaus, if !launched
  17.     if b->Misc[CAUGHT]
  18.         when launching
  19.        
  20.         b->Step = b->Misc[OLDSTEP]
  21.         b->Misc[CAUGHT] = 0
  22.        
  23.    
  24.         when launched = false,
  25.    
  26. if a powerup --other thananother catch-- hits the vaus, restore b->Step from Misc[OLDSTEP]
  27.     this is why powerups all need a param of lweapon b
  28.  
  29. store diffrencebetween v>X and b->X when catching, and save it in b->Misc[CAUGHT_dist], then
  30. when !launched, instead of the normal position on the vaus, reposition the ball, using this
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement