Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ffc script Eye_Sentry{
- void run(int item_id, int perm, bool left){
- bool triggered = false;
- float angle;
- int sfxTimer;
- if(Screen->D[perm]==1)
- triggered= true;
- while(!Link->Item[item_id])
- Waitframe();
- Screen->D[perm]=1;
- this->Data++;
- while(!triggered){
- if(left){
- //angle between object and player
- angle = Angle(this->X+24, this->Y+8,Link->X+8,Link->Y);
- //Because arc is weird.
- angle *=-1;
- Screen->Arc(3, this->X+8, this->Y+8, 256, angle+10,angle-10, 1, 1, 0, 0, 0, true, true, OP_TRANS);
- }
- else{
- angle = Angle(this->X+8, this->Y+8,Link->X+8,Link->Y);
- angle *=-1;
- Screen->Arc(3, this->X+8, this->Y+8, 256, angle+10,angle-10, 1, 1, 0, 0, 0, true, true, OP_TRANS);
- }
- //Create sound every sixty seconds.
- if ( sfxTimer == 0 ) Game->PlaySound(SFX_X_RAY);
- sfxTimer = (sfxTimer+1)% 60;
- Waitframe();
- }
- this->Data=GH_INVISIBLE_COMBO;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement