Advertisement
sorvani

VZ psuedo code

Dec 14th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. controller should have a spawn with whatever VZ respawn timer is.
  2. VZ should not have a spawn
  3. On spawn, the controller will have the loot that the final VZ needs.
  4. on spawn, he will spawn the first VZ.
  5. when VZ spawns he will read the loot on the controller and copy it (this is a bit advanced and not sure of an example, but code exists)
  6. when VZ spawns he will always signal to the controller that he spawned.
  7. the controller will respond to the "ispawned" signal with a signal letting VZ know which phase it is on.
  8. on all subsequent spawns of VZ, the controller also spawns the clones. no logic needed as it is an "Always"
  9. on death of VZ, VZ will spawn the PP (easier him instead of controller as the xyz loc is needed) and signals controller to despawn with timer.
  10.  
  11. VZ psuedo code:
  12. on spawn
  13. signal controller i spawned!
  14. copy loot from controller
  15. end spawn
  16.  
  17. on signal
  18. if signal = phase1 then
  19. set hp event to 75 or what ever first repop hp event is
  20. elseif signal = phase2 or signal = phase3 then
  21. set hp event to 50 or whatever
  22. elseif signal = phase4 then
  23. is anything needed here? i forgot event
  24. end if
  25. end signal
  26.  
  27. on hp event
  28. signal controller with signal "depopping"
  29. depop
  30. end hp event
  31.  
  32. on death
  33. spawn PP
  34. signal controller i deaded
  35. end
  36.  
  37. controller psudeo code
  38. on spawn
  39. set local phase counter variable = 1
  40. spawn VZ
  41. end spawn
  42.  
  43. on signal
  44. if signal - ispawned then
  45. signal phase counter to VZ
  46. elseif signal = depopping then
  47. phase counter += 1
  48. spawn VZ
  49. spawn clones
  50. elseif signal = deaded then
  51. depop self with timer
  52. end
  53. end signal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement