Hi i have a question.
On certain games they got the earthquake secrets effects with the specific sound
but where i shall put the Screen->Quake(30); ? and where i have to open the script file for that ?
Edited by Cedric, 16 April 2017 - 02:44 PM.
Posted 16 April 2017 - 02:44 PM
Hi i have a question.
On certain games they got the earthquake secrets effects with the specific sound
but where i shall put the Screen->Quake(30); ? and where i have to open the script file for that ?
Edited by Cedric, 16 April 2017 - 02:44 PM.
Posted 16 April 2017 - 03:07 PM
Hi i have a question.
On certain games they got the earthquake secrets effects with the specific soundbut where i shall put the Screen->Quake(30); ? and where i have to open the script file for that ?
In what kind of script do you want to use it?
Posted 16 April 2017 - 03:10 PM
Just place that line in the running part of the script. You can edit the number to change how long the screen will shake. As for the sound effect, you have to add another script line to play your wav : Game->PlaySound(10); (if your sound effect is number 10 in the ZQ effects list, for example)
Posted 16 April 2017 - 03:24 PM
Like this way
Posted 16 April 2017 - 03:42 PM
alright thanks
That works however how i could active this one when i hit a secret trigger or beat all enemys ?
Edited by Cedric, 16 April 2017 - 03:53 PM.
Posted 16 April 2017 - 05:34 PM
//Trigger on secrets if(Screen->State[ST_SECRET] == true) { Screen->Quake = 30; Game->PlaySound(sfx); } //trigger on all enemies defeated if(Screen->NumNPCs() <= 0) { Screen->Quake = 30; Game->PlaySound(sfx); }
Posted 16 April 2017 - 05:52 PM
Like this ?
item script KillEnemiesQuake { void run (int sfx) { //Trigger on secrets if(Screen->State[ST_SECRET] == true) { Screen->Quake = 30; Game->PlaySound(sfx); } //trigger on all enemies defeated if(Screen->NumNPCs() <= 0) { Screen->Quake = 30; Game-> PlaySound(sfx); Link->Jump = 1; } }
Posted 16 April 2017 - 05:54 PM
Like this ?
item script KillEnemiesQuake { void run (int sfx) { //Trigger on secrets if(Screen->State[ST_SECRET] == true) { Screen->Quake = 30; Game->PlaySound(sfx); } //trigger on all enemies defeated if(Screen->NumNPCs() <= 0) { Screen->Quake = 30; Game-> PlaySound(sfx); Link->Jump = 1; } }
Yes that would work D0 is the number of the soundfx you want to use.
edit: you could rewrite that even further if you like.
Edited by judasrising, 16 April 2017 - 05:57 PM.
Posted 16 April 2017 - 05:58 PM
I compile that and that not works...
Posted 16 April 2017 - 06:00 PM
I compile that and that not works...
What is the error?
Posted 16 April 2017 - 06:01 PM
Added the missing brace and streamed lined the if block. (Save the frames, always)
Note that it'll trigger if all NPCs are dead OR secrets are triggered. Also why is this a item script, doesn't seem like a item type script to me? Item scripts only run 1 frame when the item is used or picked up.
item script KillEnemiesQuake { void run (int sfx) { //Trigger on secrets if(Screen->State[ST_SECRET] == true) { Screen->Quake = 30; Game->PlaySound(sfx); Link->Jump = 1; } //trigger on all enemies defeated else if(Screen->NumNPCs() <= 0) { Screen->Quake = 30; Game-> PlaySound(sfx); Link->Jump = 1; } } }
Posted 16 April 2017 - 06:06 PM
alright thanks
Posted 16 April 2017 - 08:04 PM
huh.. can you show me the setups with the screenshot ?
Posted 17 April 2017 - 11:09 AM
Like this ?
item script KillEnemiesQuake { void run (int sfx) { //Trigger on secrets if(Screen->State[ST_SECRET] == true) { Screen->Quake = 30; Game->PlaySound(sfx); } //trigger on all enemies defeated if(Screen->NumNPCs() <= 0) { Screen->Quake = 30; Game-> PlaySound(sfx); Link->Jump = 1; } }
Missing bracket aside, this doesn't work because it's an item script. It should be "ffc script" and not "item script", and the ffc needs to be placed on the screen where you want this to happen.
Posted 17 April 2017 - 11:54 AM
0 members, 1 guests, 0 anonymous users