PDA

View Full Version : Screen distortion script



Anarchy_Balsac
10-06-2007, 01:08 AM
I need a screen distortion script. I want it to distort everythingon the screen from colors to screen details. I want it to activate when the player gets to certain rooms and then display a given string. Can anyone write this?

Gleeok
10-06-2007, 01:32 AM
Why dot use "Underwater wave effects" for that particular screen? Then you could set up combos to animate/ pallette cycle however you wanted, and it'd be much easier than scripting all that.

For the message:


//D0 - the message to display
//D1 - the message delay


ffc script message{

void run( int zoloft, int prozac){

Waitframes(prozac);
Screen->Message(zoloft);
Waitframe();
}
}

Anarchy_Balsac
10-06-2007, 01:42 AM
Thanks, I'll have to be implementing that one tomorrow. Is it possible to hook this up to a wizzrobe's 8-way attack too? Don't need a string for that, but probably one for his death.

Gleeok
10-06-2007, 01:56 AM
This one will play once the boss is defeated.

...Oh and I hope you dont mind, but I also added the ability to set a new MaxHP for the boss.



//D0 - the message to display
//D1 - the new HP of the boss


ffc script message_from_beyond{

void run(int you_bastard, int hitpoints){

Waitframes(4);
npc bossy = Screen->LoadNPC(1);
bossy->HP = hitpoints;

while(true){

if (bossy->HP > 0){ Waitframe(); }

else {
Screen->Message(you_bastard);
Waitframe(); }
}
}
}


I'm suprised you haven't asked for some evil enemy boss or attack scripts yet. What's up with that?

Anarchy_Balsac
10-06-2007, 05:05 PM
This one will play once the boss is defeated.

...Oh and I hope you dont mind, but I also added the ability to set a new MaxHP for the boss.

Np, thanks.


I'm suprised you haven't asked for some evil enemy boss or attack scripts yet. What's up with that?

I was going to, but simply making the final boss fire in 8 directions instead of one apparently sufficed. Go ahead and modify him as such in 579+ and you'll see that he moves much more eratically and is extremely difficult to deal with when you also have to use the lens to see him and avoid the 8 heart damage combos.

I'm trying to compile your first script right now but it isn't working, I copied and pasted exactly though.

Gleeok
10-06-2007, 06:46 PM
I'm trying to compile your first script right now but it isn't working, I copied and pasted exactly though.

Huh? Works fine for me. Note that when I first posted it I edited out a typo, I typed an e instead of an o...they're like right next to eachother...

Also I forgot to mention that D1 is in tics. the same as timed warps.

Anarchy_Balsac
10-06-2007, 07:03 PM
Right, I used that, the only thing is I'm thinking maybe there's some code you didn't post that also needs to be encoded in(such as defining the ints and the void). I don't know how to define all that because I'm extremely new to zscripts.

Gleeok
10-06-2007, 08:11 PM
No, it's all there. Just import, compile, set scripts into slots. Then all you have to do is go to Data->FFC->set script slot #, then set Arguments...oh and change the combo! I use combo 54, 'cause it's transparent.

Under D0 type the number of the message you want.

Under D1 type the tics untill the message appears.

Anarchy_Balsac
10-06-2007, 08:20 PM
I'll give it a try.