Jump to content

Photo

[2.55 A99] Quake Hammer + Super Quake Triggers


  • Please log in to reply
8 replies to this topic

#1 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 10 December 2021 - 06:45 PM

hi so i wanted to have a hammer upgrade in my quest before I realized there's no actual way to make combos get triggered by the hammer abilities but not the base hammer. (potential future feature maybe?)

 

if this is at all possible id greatly appreciate any help as always !


Edited by Jenny, 10 December 2021 - 06:45 PM.

  • Shane likes this

#2 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 10 December 2021 - 07:27 PM

So, you want combos, to react on the quake function, right?


Edited by Bagu, 10 December 2021 - 07:27 PM.


#3 Jenny

Jenny

    braixen

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 10 December 2021 - 07:32 PM

When hit by the quakes, yeah.



#4 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 10 December 2021 - 08:08 PM

ffc script QuakeHammerCMB
{
    void run(int new_cmb, int sfx)
    {
	while(true){
	    if(Screen->Quake){
		Audio->PlaySound(sfx);
	        Screen->ComboD[ComboAt(this->X, this->Y)]= new_cmb;
	    }
	    Waitframe();
	}
    }
}

Thought of making it a combo scriptbut as an ffc script it'smore flexible.

Place the ffc on the combo that should be affected by the quake (the ffc has to be on grid)

assign the combo it should turn into, to FFC's D0 attribute


I just edited it
now you can assign a variable sound effect


When hit quake by the
...okay that would just require to check links distance to the ffc 


This will exactly do what you want,

D0 is the ID of the "secret" combo, that should appear when hit by the effect
D1 is the sound effect you want to play when it gets triggerd
and D2 is the max distance (in pixel) that link may be away from the ffc (and the combo you placed it on)

 

ffc script QuakeHammerCMB
{
    void run(int new_cmb, int sfx, int dist)
    {
	while(true){
	    if(Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	        if(Screen->Quake){
		    Audio->PlaySound(sfx);
	            Screen->ComboD[ComboAt(this->X, this->Y)]= new_cmb;
		}
	    }
	    Waitframe();
	}
    }
}

Edited by Bagu, 10 December 2021 - 08:53 PM.

  • Shane likes this

#5 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 10 December 2021 - 09:16 PM

ffc script QuakeHammerCMB
{
    void run(int new_cmb1, int new_cmb2, int new_cmb3, int new_cmb4, int sfx, int dist)
    {
	while(true){
	    if(Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	        if(Screen->Quake){
		    Audio->PlaySound(sfx);
		    if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
		    if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y-16)] = new_cmb2;}
		    if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y-16)] = new_cmb3;}
		    if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb4;}
                    Quit();
		}
	    }
	    Waitframe();
	}
    }
}

Edited by Bagu, 11 December 2021 - 05:20 PM.


#6 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 12 December 2021 - 05:32 AM

Jenny, apparently, mentioned charging Quake Hammer/Super Quake and directly striking trigger, as it was done in Experimental Arsenal (stdWeapons.zh demo).


  • Jenny and Bagu like this

#7 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 12 December 2021 - 08:45 AM

Here's my final version of the Quake trigger

...it's supposed to trigger 1x1(16x16), 1x2(16x32) or 2x2(32x32) Combo Blocks, and replace em by other variable combos.
Create and FFC with the Tile Width/Height and the Combo(Effect) Width/Height of the Combo(Block) that you want to trigger/replace.
Place it above the chosen Combo (Block) ...it has to be on grid(!!!)

The script checks Link's (center) distance, to the center of the FFC.
If he's close enough, the quake will trigger the script effects.

You can also decide if a "Super Quake" attack is required, to trigger the effects.

D0-D3 are the IDs of the "secret" combos, that should appear when hit by the quake

 

arranged like this:

cmb1    cmb3
cmb2    cmb4

If you want to trigger a 1x1(16x16) object, assign one "replace combo" ID to D0 (and leave D1-D3 = 0)

If you want to trigger a 1x2(16x32) object, assign two "replace combo" IDs to D0 and D1 (and leave D2 + D3 = 0)
...and if 
you want to trigger a 2x2(32x32) object, assign four "replace combo" IDs to D0, D1, D2 and D3.

 

D4 is the sound effect you want to play when it gets triggerd

D5 is the max distance (in pixel) that link may be away from the ffc center (and the center of the combo block you placed it on).

D6 is used to create Super Quake triggers
...if the object shall only be triggered by Super Quake effects, set D6 to "1", if you leave it "0" it will be an ordinary quake trigger.


 

ffc script QuakeHammerCMB
{
    void run(int new_cmb1, int new_cmb2, int new_cmb3, int new_cmb4, int sfx, int dist, int sup_quake)
    {
	while(true){
	    if(sup_quake == 0){
	        if(Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	            if(Screen->Quake){
		        Audio->PlaySound(sfx);
		        if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
		        if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y+16)] = new_cmb2;}
		        if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb3;}
		        if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y+16)] = new_cmb4;}
		        Quit();
		    }
		}
	    }
	    else if(sup_quake == 1){
	        if(Link->Item[I_QUAKESCROLL2] && Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	            if(Screen->Quake){
		        Audio->PlaySound(sfx);
		        if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
		        if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y+16)] = new_cmb2;}
		        if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb3;}
		        if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y+16)] = new_cmb4;}
		        Quit();
		    }
		}
	    }
	    Waitframe();
	}
    }
}

Edited by Bagu, 12 December 2021 - 11:25 AM.

  • Jenny likes this

#8 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 12 December 2021 - 10:32 AM

Jenny, apparently, mentioned charging Quake Hammer/Super Quake and directly striking trigger, as it was done in Experimental Arsenal (stdWeapons.zh demo).

I just made it, in the easiest way, that came up to my mind.
It's simple but not really elegant and should not be used on screens, which will quake for other reasons.(like  for example, by the earthquake ffc script)

...but yeah, it works
And it's independend of the engine screen secrets

Although, I guess I will write a second version, depending on charge levels.
But for the moment, this one will basically offer the requested functions.

I could also add a variable Screen D slot, to write and check ...and can create permanent triggers, this way.
So, when crushing something by the quake, the script would set a certain screen register from "0" to "1"
...and on next entry, it would check the register (on init)
...and if it's not = "0", it will silently recreate the exchanged combo(s) and quit.


Edited by Bagu, 12 December 2021 - 10:59 AM.

  • Jenny likes this

#9 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 12 December 2021 - 04:55 PM

One last update for today ;)

 

This version (still triggered by my dummy way) will allow to create permanent triggered combo(blocks)
...independent of engine screen secrets


SetUp:

Create an FFC with the Tile Width/Height and the Combo(Effect) Width/Height of the Combo(Block) that you want to trigger/replace.
Place it on the chosen Combo (Block) ...it has to be on grid(!!!)


D0 - D3 = exchange combo IDs
(number of assigned "new" combos declares combo block size (16x16, 16x32 or 32x32)

D4 = Sound effect

D5 = Trigger Sensivity Distance ( how far the quake may be away from the ffc) in Pixel

D6 = Quake and Trigger Type

Type 0 = Ordinary Quake Trigger (temporary)
Type 1 = Super Quake Trigger (temporary)

Type 2 = Ordinary Quake Trigger (permanent)
Type 3 = Super Quake Trigger (permanent)

D7 = A Screen D0-7 slot to write and check
...used to check the state of pemanent triggers


You can use max 8 permanent triggers per screen
...if you use more than 1 assign each to another Screen D slot (0-7)

!!!TAKE CARE NOT TO DISTURB OTHER SCRIPTS
THAT ALSO WRITE TO SCREEN D SLOTS!!!

 

ffc script QuakeHammerCMB
{
    void run(int new_cmb1, int new_cmb2, int new_cmb3, int new_cmb4, int sfx, int dist, int quake_trig_type, int scr_reg)
    {
	if((Screen->D[scr_reg] > 0) && (quake_trig_type >= 2)){
	    if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
	    if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y+16)] = new_cmb2;}
	    if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb3;}
	    if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y+16)] = new_cmb4;}
	    Quit();
	}
	while(true){
	    if(quake_trig_type == 0){
	        if(Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	            if(Screen->Quake){
		        Audio->PlaySound(sfx);
		        if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
		        if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y+16)] = new_cmb2;}
		        if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb3;}
		        if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y+16)] = new_cmb4;}
		        Quit();
		    }
		}
	    }
	    else if(quake_trig_type == 1){
	        if(Link->Item[I_QUAKESCROLL2] && Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	            if(Screen->Quake){
		        Audio->PlaySound(sfx);
		        if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
		        if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y+16)] = new_cmb2;}
		        if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb3;}
		        if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y+16)] = new_cmb4;}
		        Quit();
		    }
		}
	    }
	    else if(quake_trig_type == 2){
	        if(Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	            if(Screen->Quake){
		        Audio->PlaySound(sfx);
			Screen->D[scr_reg] = 1;
		        if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
		        if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y+16)] = new_cmb2;}
		        if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb3;}
		        if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y+16)] = new_cmb4;}
		        Quit();
		    }
		}
	    }
	    else if(quake_trig_type == 3){
	        if(Link->Item[I_QUAKESCROLL2] && Distance(CenterLinkX(), CenterLinkY(), CenterX(this), CenterY(this))<=dist){
	            if(Screen->Quake){
		        Audio->PlaySound(sfx);
			Screen->D[scr_reg] = 1;
		        if(new_cmb1 > 0){Screen->ComboD[ComboAt(this->X, this->Y)] = new_cmb1;}
		        if(new_cmb2 > 0){Screen->ComboD[ComboAt(this->X, this->Y+16)] = new_cmb2;}
		        if(new_cmb3 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y)] = new_cmb3;}
		        if(new_cmb4 > 0){Screen->ComboD[ComboAt(this->X+16, this->Y+16)] = new_cmb4;}
		        Quit();
		    }
		}
	    }
	    Waitframe();
	}
    }
}

Edited by Bagu, 13 December 2021 - 04:05 AM.

  • Jenny likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users