Jump to content

Photo

Metroid Item-thingys help (Jump button and Multiple Sword Beams)


  • Please log in to reply
24 replies to this topic

#1 CreeperWithStyle

CreeperWithStyle

    Newbie

  • Members
  • Real Name:Albin
  • Location:Somewhere in the deep dark depths of Sweden

Posted 13 September 2015 - 04:58 AM

Well, I just started to work on a Metroid quest. And having to jump with an item is not the best in a sidescroller. Well I basicly need help to make a jump button. Having multiple sword beams is not as important, but it would be really good if someone could help me with that too. (Sorry if my English skills aren't the best)



#2 Astromeow

Astromeow

    RESPECT DA OBOE SOLO

  • Members

Posted 13 September 2015 - 08:19 AM

There is a script somewhere on this website for jumping. This script allows players to jump using the "L" button, allowing full use of two item slots+Jump

 

I wish I could find it but I haven't had any luck, surprisingly.

 

 

How and why do you want multiple sword beams? If you are trying to make Samus's arm cannon, there is better and more efficient ways to add such a quest item/equipment. 

 

I am a sidescroll-metroid quest designer and would love to help you in the right directions. Likewise, we have other skilled users, likely better than I, in the Zelda Classic Sidescroll category


Edited by Astromeow, 16 September 2015 - 10:39 AM.

  • ShadowTiger and Jared like this

#3 ywkls

ywkls

    Master

  • Members

Posted 13 September 2015 - 09:08 AM

Here's some links to topics with scripts that would be useful in a Metroid-style quest. (I should know, since  I made one and requested most of these myself.)
 
Sideview Enemy Pack- enemies that behave properly in sideview gravity. Developed by Moosh.
Metroid-Style Space Jump- lets you create a jump item that works like the Space Jump.Also handles the regular jump and Hi-jump. Developed by Lejes.
Metroid-Style Screw Attack- creates an item that destroys combos above you with a certain flag when you jump. Developed with the aid of justin. Please note that this sets screen secrets right now since a better method of making sure you couldn't get stuck behind a barrier that could only be destroyed from below hasn't yet been developed.
Metroid-Style Ammo Refill- lets you have an ffc refill your ammo of various types. Developed with the aid of justin.
 
There's also a script somewhere that can be used to simulate jumping in water in sideview, which I was planning to adapt later on as an alternative Spring Ball. Let me know if you need any help setting these up.


Edited by ywkls, 11 October 2015 - 02:53 PM.

  • Astromeow likes this

#4 Astromeow

Astromeow

    RESPECT DA OBOE SOLO

  • Members

Posted 13 September 2015 - 09:44 AM

There's also a script somewhere that can be used to simulate jumping in water in sideview, which I was planning to adapt later on as an alternative Spring Ball. Let me know if you need any help setting these up.

 

Unless users plan to script a certain arc or velocity-momentum kind of stuff, there shouldn't be too much of a need to replicate water in side view.

 

I myself have water in side view and it works well, by using the slow walk combo. It's already implemented and easy to use; use layer 0 for slowwalk and layer 3 for water appearing to submerge the player

 

As always with any side scroller, ensure the "Combos affect midair Link" is true


Edited by Astromeow, 13 September 2015 - 11:19 AM.


#5 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 13 September 2015 - 11:48 AM

import "std.zh"

item script ArmCannon
{

void run()
{

lweapon shot = Screen->CreateLWeapon(LW_SCRIPT1);
shot->Step = 150;
shot->Damage = this->Power;
shot->Dir = Link->Dir;

if (Link->Dir == 0)
{
shot->X = Link->X;
shot->Y = Link->Y - 14;
}

else if (Link->Dir == 1)
{
shot->X = Link->X;
shot->Y = Link->Y + 14;
}

else if (Link->Dir == 2)
{
shot->X = Link->X - 14;
shot->Y = Link->Y;
}

else if (Link->Dir == 3)
{
shot->X = Link->X + 14;
shot->Y = Link->Y;
}
}
}

Try this. Assign the script to a custom item, set the item to one of the custom item classes, and set the item's power to the damage you want it to do (Should be greater than 1).



#6 CreeperWithStyle

CreeperWithStyle

    Newbie

  • Members
  • Real Name:Albin
  • Location:Somewhere in the deep dark depths of Sweden

Posted 13 September 2015 - 01:00 PM

Thank you very much guys! :)

#7 CreeperWithStyle

CreeperWithStyle

    Newbie

  • Members
  • Real Name:Albin
  • Location:Somewhere in the deep dark depths of Sweden

Posted 13 September 2015 - 02:13 PM

import "std.zh"

item script ArmCannon
{

void run()
{

lweapon shot = Screen->CreateLWeapon(LW_SCRIPT1);
shot->Step = 150;
shot->Damage = this->Power;
shot->Dir = Link->Dir;

if (Link->Dir == 0)
{
shot->X = Link->X;
shot->Y = Link->Y - 14;
}

else if (Link->Dir == 1)
{
shot->X = Link->X;
shot->Y = Link->Y + 14;
}

else if (Link->Dir == 2)
{
shot->X = Link->X - 14;
shot->Y = Link->Y;
}

else if (Link->Dir == 3)
{
shot->X = Link->X + 14;
shot->Y = Link->Y;
}
}
}

Try this. Assign the script to a custom item, set the item to one of the custom item classes, and set the item's power to the damage you want it to do (Should be greater than 1).

 

 

Could I get a little more detailed description on how to get this to work? I'm still pretty new to these script things.



#8 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 13 September 2015 - 07:26 PM

Step 1: Go to "Quest" -> "Scripts" -> "Compile ZScript"

Step 2: Press "Import" and locate the script file you need. (Note that if you're going to use mulitple scripts, you need to copy/paste them all into a single file)

Step 3: Press "Compile"

 

If you see an error, you need to follow the directions to see what needs tweaked. If it says "Success!", you're fine.

 

Step 4: Go to the Item Editor, and create a custom item, following the directions that Dimentio gave you on how to put it together.

Step 5: In the "Scripts" tab, you need to open the dropdown list for the Action script, and pick the script to go to the item.

Step 6: Give Link the item, test you quest out, and try out the new weapon!

 

 

Now, if you absolutely can't figure out how to set up the script, I once tried faking an Arm Cannon without scripts. I made a stab-only sword, that fired beams at zero HP, so you could shoot beams regardless of Link's current health. Make the beams do identical damage to the sword itself, and you should be fine. If you're still nervous that it won't look right, you should be able to further fake it by removing the graphics to the Sword weapon. Multiple beams would be done by picking up Sword upgrades with the same settings but more damage.

 

You won't be able to make fancy effects like a Wave Beam or Spazer Beam (I forget, is that the three-splitting beam, or was that Plasma Beam?), but if you can get the script Dimentio gave you working, it would be simple to read how the script works, and figure out how to make multiple versions. In fact, I would recommend looking at the script and making a Spazer Beam version yourself. You should be able to work it out easily by reading off what's already there! (Wave Beam would be a bit more math, though.)



#9 CreeperWithStyle

CreeperWithStyle

    Newbie

  • Members
  • Real Name:Albin
  • Location:Somewhere in the deep dark depths of Sweden

Posted 22 September 2015 - 11:24 AM

Step 1: Go to "Quest" -> "Scripts" -> "Compile ZScript"
Step 2: Press "Import" and locate the script file you need. (Note that if you're going to use mulitple scripts, you need to copy/paste them all into a single file)
Step 3: Press "Compile"
 
If you see an error, you need to follow the directions to see what needs tweaked. If it says "Success!", you're fine.
 
Step 4: Go to the Item Editor, and create a custom item, following the directions that Dimentio gave you on how to put it together.
Step 5: In the "Scripts" tab, you need to open the dropdown list for the Action script, and pick the script to go to the item.
Step 6: Give Link the item, test you quest out, and try out the new weapon!
 
 
Now, if you absolutely can't figure out how to set up the script, I once tried faking an Arm Cannon without scripts. I made a stab-only sword, that fired beams at zero HP, so you could shoot beams regardless of Link's current health. Make the beams do identical damage to the sword itself, and you should be fine. If you're still nervous that it won't look right, you should be able to further fake it by removing the graphics to the Sword weapon. Multiple beams would be done by picking up Sword upgrades with the same settings but more damage.
 
You won't be able to make fancy effects like a Wave Beam or Spazer Beam (I forget, is that the three-splitting beam, or was that Plasma Beam?), but if you can get the script Dimentio gave you working, it would be simple to read how the script works, and figure out how to make multiple versions. In fact, I would recommend looking at the script and making a Spazer Beam version yourself. You should be able to work it out easily by reading off what's already there! (Wave Beam would be a bit more math, though.)


Suuuuuuper late response, I made the item and everything, but when Link picks it up nothing happens. I put the item on the subscreen too, but it still didn't work. I have no idea what to do...

#10 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 25 September 2015 - 03:24 PM

Mind posting some pictures of the different tabs of your Item Editor?



#11 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 25 September 2015 - 11:30 PM

Make sure the item is an "Equipment Item". Check that in the item editor.



#12 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 26 September 2015 - 03:34 AM

Jumping is extremely basic, but for 'Metroid', you have a variety of jump types, that have never been scripted:

 

Morph Ball Hop (Easy)

Space Jump (Moderate)

Screw Attack (Difficult)

 

I would sort of be interested in working on this, as a full-scrolling attempt. It would make a fascinating case-study for scrolling engine/enemy code. If you want to design all the screens (without enemies, and with secrets marked by special combos on layers 4, 5 and 6), I'd be willing to entertain adding in a scrolling dynamic; but I have never done that with gravity as a factor; so it'd not be a fast project.


Edited by ZoriaRPG, 26 September 2015 - 03:35 AM.


#13 ywkls

ywkls

    Master

  • Members

Posted 26 September 2015 - 09:28 AM

Space Jump (Moderate)

 

I'm not sure that there is even a need to improve the method used by Lejes to emulate this behavior in that link I provided. As it works now, when you have just a regular jump item (like the Roc's feather) you jump at one height. When you have the Hi-Jump boots, you jump at a different height. When you have the Space Jump, you jump at the Hi-jump height, then can jump again after you start to fall.

 

 

Screw Attack (Difficult)

 

The method used in the link I provided to do this is far from complete, but might provide you with a starting point to create this. As it works now, it only destroys blocks above you while jumping and harms enemies. It doesn't destroy things that appear to the left, to the right or below you. It also automatically sets screen secrets to keep you from getting stuck by a block that was supposed to be destroyed below you. And it leaves a trail behind you as you jump rather than change your appearance.

 

 

Morph Ball Hop (Easy)

 

Are you talking about using the bombs to jump, or pressing a button? If the latter, I made a request for such a feature a long time ago; though mine would probably be more difficult to create since I was substituting the Flippers for the Morph Ball.

 

If the former... I think that might require a scripted morph ball. You'd have to make a global script that changed your appearance when you pressed down on a solid surface and back when you pressed up and areas you couldn't access unless you were in the proper form. Then, I guess it would be possible to make it where bombs were used automatically when you press the correct button and made you jump when you used them. If this could be done, I'd love to see it in action.

 

Another related feature which a Metroid-style game really would need is an easy method to walk on angled floors. I know that there was a method you helped out on that did this, but I'm not sure that I entirely understand it or whether it could easily be used by someone else.



#14 ywkls

ywkls

    Master

  • Members

Posted 26 September 2015 - 11:39 PM

Just to try and see what might be involved, I attempted to script a Morph Ball. This script follows all the rules I've learned about scripts thus far and yet doesn't work in any way. Further, it interferes with other scripts that are running at the same time. I'm posting it here because it seems like the best way to learn how to fix this problem would be to let others see my train of thought and help me find out where it derailed. And because I'd really like to see a scripted Morph Ball.

 

Morph Ball Script Attempt

 

This doesn't even begin to cover the Power Bombs. I've tested it in conjunction with the jumping script linked above and it completely disables it despite the fact that I don't even have the item needed to activate it at the time. I tried giving myself the correct item, but even the ability to switch between the two forms isn't working.

 

In truth, cheating by using the flippers; unwalkable water for morph ball passages and the regular bombs was much easier if not as authentic to the original Metroid. The method for jumping in water in sideview could probably be easily modified so it would only work if you had the right item. But now that I've got the idea of creating a morph ball that actually works like it is supposed to; I'd kind of like to see it through.



#15 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 27 September 2015 - 02:03 AM

It's because your function has an infinite loop. The global will reach it and then never exit.


  • ywkls likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users