also i realise now they didnt have to be methods, could have been functions, i dont think back then i knew that you could use Tcloak.Functioncall
so thats why i made them methods, then instance an object of Tcloak called cloak. Then put cloak.cloaking in my loop.
the method cloaking() controlled everything. The input from the player and then the call to the start() and uncloak() methods.
the cloakship() and decloakship() functions there are called in the methods start() and uncloak().
this here dSFX.Create(CloakFx, CloakShip, 2000)
that dsfx is delayed sound effects. so that cloakship() function is only called AFTER the sound effect is finished and completes the function of cloakship() which is to change the field "isCloaked" in tplayership to "True", so to finally set the state of being invisible/cloaked as true. Which helps with if the player presses c, shfit c multiple times, so one process doesnt start until a process is complete.
also guess i could take out the shift c now it aint neccessary and put keyhit key C for both, because they'll do different things because of the other conditions supplied. :)
its a cool effect. the AI ships slowly fades to invisible and slowly returns to visible. But the player only goes down to 0.3. You have to still see yourself after all!
want to see it in action? i can send my alpha :)
so thats why i made them methods, then instance an object of Tcloak called cloak. Then put cloak.cloaking in my loop.
the method cloaking() controlled everything. The input from the player and then the call to the start() and uncloak() methods.
the cloakship() and decloakship() functions there are called in the methods start() and uncloak().
this here dSFX.Create(CloakFx, CloakShip, 2000)
that dsfx is delayed sound effects. so that cloakship() function is only called AFTER the sound effect is finished and completes the function of cloakship() which is to change the field "isCloaked" in tplayership to "True", so to finally set the state of being invisible/cloaked as true. Which helps with if the player presses c, shfit c multiple times, so one process doesnt start until a process is complete.
also guess i could take out the shift c now it aint neccessary and put keyhit key C for both, because they'll do different things because of the other conditions supplied. :)
its a cool effect. the AI ships slowly fades to invisible and slowly returns to visible. But the player only goes down to 0.3. You have to still see yourself after all!
want to see it in action? i can send my alpha :)