Jump to content

Photo

Weapon direction, um, remapping??


  • Please log in to reply
5 replies to this topic

#1 Papa

Papa

    Disruptive and obnoxious member since 2005

  • Members
  • Real Name:Adom Lee
  • Location:Stuck between the pages...

Posted 24 June 2020 - 09:45 PM

v2.50 build 29

Custom tileset

Likely a scripted answer lol

 

 

Does anyone know of a way, scripted or otherwise, of "remapping" the directional attacks? To clarify, think of the old school vertical/ horizontal shoot em ups like Gradius and Life Force. Is it possible to fire in just one direction, despite the direction you're facing?? And to make it even more fun, IF possible, is it also possible to make it map specific?

 

Basically, I'm trying to have a secondary mode of game play, alternating between over world and flight levels. Think The Guardian Legend, if you're familiar with it. I know I don't ask for much lol, but I'm also not expecting any easy answer, if any. Thanks in advance!!

 

*grammatical edit*


Edited by Papa, 24 June 2020 - 09:48 PM.


#2 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 24 June 2020 - 09:51 PM

How would you be planning to implement these shmup sections? If you're just disabling most of Link's items per DMap and replacing them with a "gun" one it's very simple to script an item that just creates upwards travelling weapons. It's also possible to force Link to face one direction via a global script though, if you're intending on having the same inventory as usual be available.


  • Mani Kanina likes this

#3 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 24 June 2020 - 09:54 PM

I'm pretty sure this would need a scripted solution of some kind, but it does not seem too complicated, in fact, I recall a gradius clone was even made at one point in the engine.



#4 Papa

Papa

    Disruptive and obnoxious member since 2005

  • Members
  • Real Name:Adom Lee
  • Location:Stuck between the pages...

Posted 24 June 2020 - 09:59 PM

Shmup levels would be located on a secondary map all on its own, reached from fixed points on the main overworld map. Disabling items seems to be the most straightforward way to go. If it goes beyond a simple paste-in script, I'm in for a ride lol. This is actually something I've wanted to try and implement for a long time in previous games for fun, but with this its almost crucial.



#5 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 24 June 2020 - 10:24 PM

//D0: Step speed of the weapon (100 = 1 pixel per frame)
//D1: Sprite used for the weapon, see Weapons/Misc menu
//D2: Sound the weapon plays when used
item script BasicShmup{
	void run(int step, int sprite, int sfx){
		Game->PlaySound(sfx);
		lweapon l = CreateLWeaponAt(LW_SHMUPSHOT, Link->X, Link->Y-8);
		l->UseSprite(sprite);
		l->Dir = DIR_UP;
		l->Step = step;
		l->Damage = this->Power*2;
	}
}

Okay, here's a very simple active item script for a start. You press the button, it fires a weapon upwards.

Make a new item using one of the Custom Itemclass item classes. In the script tab, give it this script from the Action Script dropdown and set the following arguments:

  • D0: The speed the weapon fires at. A speed of 100 would travel at 1 pixel per frame.
  • D1: The sprite the weapon uses. You can edit these in Quest->Graphics->Sprites->Weapons/Misc.
  • D2: A sound to play when the weapon fires.

The weapon's damage is determined by the Power setting on the Data tab.


  • Mani Kanina likes this

#6 Papa

Papa

    Disruptive and obnoxious member since 2005

  • Members
  • Real Name:Adom Lee
  • Location:Stuck between the pages...

Posted 24 June 2020 - 10:35 PM

Okay, here's a very simple active item script for a start.

 

 

Beautiful. My thanks eternal lol. I'll update the results, as the migraine sees fit to allow me. Appreciate it Moosh  :bounce:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users