Jump to content

Photo

Super Bomb and Candle Scripts?


  • Please log in to reply
3 replies to this topic

#1 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Members
  • Gender:Male
  • Location:Hyrule/USA

Posted 16 July 2018 - 10:21 PM

Unless it's a hard thing, can the Super Bomb and Candle flame be scripted to not fall on screens with sideview gravity? (in other words they are sideview gravity screens, but those two weapons act like they're not and ignore the gravity)

 

EDIT: Note this is a minor request. It'd be cool, but no big deal.


Edited by Cukeman, 17 July 2018 - 12:23 AM.


#2 ywkls

ywkls

    Warrior

  • Members
  • Gender:Unspecified

Posted 17 July 2018 - 01:10 AM

Unless it's a hard thing, can the Super Bomb and Candle flame be scripted to not fall on screens with sideview gravity? (in other words they are sideview gravity screens, but those two weapons act like they're not and ignore the gravity)

 

EDIT: Note this is a minor request. It'd be cool, but no big deal.

 

The "bomb" (the object before it explodes) or the explosion?

One is possible... the other, maybe? (Yet to be tested)

 

As far as the Candle flame... yeah, I'm not sure if that's gonna happen.

It tends to ignore attempts to adjust X and Y and stuff.

 

This code will make all LWeapons ignore sideview gravity (theoretically). I haven't tried it with LW_BOMB, LW_SBOMB or LW_FIRE yet since they're notoriously hard to manipulate.

void __UpdateLWF_G_Force(){
	lweapon wpn;
	for(int i = Screen->NumLWeapons();i>0;i--)
	wpn= Screen->LoadLWeapon(i);
	wpn->Jump = 0;
}

I'd put that after Waitdraw in the global while loop, just to be safe. Making affect some but not all LWeapons is possible, but would need specifics.


Edited by ywkls, 17 July 2018 - 01:11 AM.

  • ShadowTiger likes this

#3 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Members
  • Gender:Male
  • Location:Hyrule/USA

Posted 18 July 2018 - 12:52 AM

I guess making all weapons unaffected by gravity is fine

import "std.zh"

global script ActiveGlobal
{
    void run()
    {
        // Before while
        while(true)
        {
            // Before Waitdraw
            Waitdraw();
            // After Waitdraw

void __UpdateLWF_G_Force(){
    lweapon wpn;
    for(int i = Screen->NumLWeapons();i>0;i--)
    wpn= Screen->LoadLWeapon(i);
    wpn->Jump = 0;
}

            Waitframe();
        }
    }
}

Like that, right?



#4 ywkls

ywkls

    Warrior

  • Members
  • Gender:Unspecified

Posted 18 July 2018 - 09:54 AM

Like that, right?


Not exactly.

import "std.zh"

global script ActiveGlobal
{
    void run()
    {
        // Before while
        while(true)
        {
            // Before Waitdraw
            Waitdraw();
            // After Waitdraw
            if(IsSideview())
	        __UpdateLWF_G_Force()
            Waitframe();
        }
    }
}

void __UpdateLWF_G_Force(){
    lweapon wpn;
    for(int i = Screen->NumLWeapons();i>0;i--)
    wpn= Screen->LoadLWeapon(i);
    wpn->Jump = 0;
}

I don't know if you can declare a second void inside the while loop like you were trying to do or not, to be honest.

This is the way I'd do it, though.

 

Edit: I updated the code slightly, because the previous version would have affected LWeapons whether you were in a sideview area or not.

I don't know how it would affect things in non-sideview areas, but the function IsSideview() is from std.zh and will make it only adjust screens where that flag is checked.


Edited by ywkls, 18 July 2018 - 12:50 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users