Jump to content

Photo

Damaging Sparkle Sprite Trail for the Sword beam... possible?

LWeapon Script 2.55

  • Please log in to reply
19 replies to this topic

#1 Bagu

Bagu

    Fandomizer

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

Posted 14 March 2020 - 06:56 AM

Is it possible to add a trail of damaging Sparkle Sprites to the Sword Beam?
Sparkle Sprite Numbers should be variables

...variable sfx for the beam sound would be funny too, but it's not nessessary.

 

  

Thanks

Bagu


Edited by Bagu, 14 March 2020 - 07:21 AM.


#2 Bagu

Bagu

    Fandomizer

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

Posted 29 June 2020 - 07:48 AM

Still waiting for help :)

#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 08 July 2020 - 08:02 AM

If you want this for 2.55, it is an easy weapon script.

 

Might work on it for you. I haven't closely followed threads of late, other than posting updates, and addressing bug reports.


  • Bagu likes this

#4 Bagu

Bagu

    Fandomizer

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

Posted 09 July 2020 - 07:46 AM

Thanks for your reply. 

It would be perfect as an LWeapon or Spritescript.
Yeah, I'm using 2.55 (Alpha 47)


Edited by Bagu, 09 July 2020 - 07:46 AM.


#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 14 July 2020 - 12:29 AM

Thanks for your reply. 

It would be perfect as an LWeapon or Spritescript.
Yeah, I'm using 2.55 (Alpha 47)

 

Current version is 74, not 47: 75/76 is on its way, too.  I'll have a look and see what I can make, but only for a current build.


  • Bagu likes this

#6 Bagu

Bagu

    Fandomizer

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

Posted 14 July 2020 - 04:14 AM

I'm using 2.55 74 since a few days
...I LOVE IT 

The portrait function, in the string editor is fantastic!


Edited by Bagu, 14 July 2020 - 04:15 AM.


#7 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 18 July 2020 - 05:09 AM

Try this:
 
 
lweapon script damagingtrail
{
	const int DAMAGETRAILDEFAULTCLK	 = 30;
	void run(int n)
	{
		if ( n < 1 ) n = DAMAGETRAILDEFAULTCLK;
		int clk;
		while(this->isValid())
		{
			++clk;
			if ( clk >= n )
			{
				lweapon spk = Game->CreteLWeapon(LW_SPARKLE);
				spk->X = this->X;
				spk->Y = this->Y;
				spk->Parent = this;
				clk = 0;
			}
			Waitdraw();
			Waitframe();
		}
	}
}

  • Bagu likes this

#8 Bagu

Bagu

    Fandomizer

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

Posted 18 July 2020 - 05:54 AM

Try this:
 
 

lweapon script damagingtrail
{
	const int DAMAGETRAILDEFAULTCLK	 = 30;
	void run(int n)
	{
		if ( n < 1 ) n = DAMAGETRAILDEFAULTCLK;
		int clk;
		while(this->isValid())
		{
			++clk;
			if ( clk >= n )
			{
				lweapon spk = Game->CreteLWeapon(LW_SPARKLE);
				spk->X = this->X;
				spk->Y = this->Y;
				spk->Parent = this;
				clk = 0;
			}
			Waitdraw();
			Waitframe();
		}
	}
}

Thank you, very much!!!
I gonna check it out, right now


Problems with compiling
...report says:

ERROR T21: FUNCTION GAME->CREATELWEAPON CONST FLOAT HAS NOT BEEN DECLARED
ERROR T9: VARIABLE SPK HAS NOT BEEN DECLARED


Edited by Bagu, 18 July 2020 - 07:43 AM.


#9 Emily

Emily

    Scripter / Dev

  • ZC Developers
  • Pronouns:She / Her

Posted 18 July 2020 - 08:24 AM

That should be 'Screen->CreateLWeapon()'


  • Bagu likes this

#10 Bagu

Bagu

    Fandomizer

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

Posted 18 July 2020 - 09:50 AM

That should be 'Screen->CreateLWeapon()'

I fixed that line

lweapon script damagingtrail
{
	const int DAMAGETRAILDEFAULTCLK	 = 30;
	void run(int n)
	{
		if ( n < 1 ) n = DAMAGETRAILDEFAULTCLK;
		int clk;
		while(this->isValid())
		{
			++clk;
			if ( clk >= n )
			{
				lweapon spk = Screen->CreateLWeapon(LW_SPARKLE);
				spk->X = this->X;
				spk->Y = this->Y;
				spk->Parent = this;
				clk = 0;
			}
			Waitdraw();
			Waitframe();
		}
	}
}

But now I got following error report:
LINE 16 @ COLUMNS 5-23 - ERROR T017: CANNOT CAST FROM CONST LWEAPON TO FLOAT
 


Edited by Bagu, 18 July 2020 - 09:51 AM.


#11 Emily

Emily

    Scripter / Dev

  • ZC Developers
  • Pronouns:She / Her

Posted 18 July 2020 - 11:36 AM

uhg, zoria....

Remove the 'this->Parent = this;' line. That's.... just completely wrong, and not something you can do.


  • Bagu likes this

#12 Bagu

Bagu

    Fandomizer

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

Posted 18 July 2020 - 11:56 AM

Without this line, compiling was successful, but I guess I need an altern line, to complete the script.
Seems to do nothing, by now



#13 Emily

Emily

    Scripter / Dev

  • ZC Developers
  • Pronouns:She / Her

Posted 18 July 2020 - 11:59 AM

ah, nothing is setting the sprite, or damage of the sparkles.

So, they're there, just invisible, and don't do damage.

 

Change 'void run(int n)' to 'void run(int n, int dmg, int sprite)'

Add 'spk->Damage = dmg;'

Add 'spk->UseSprite(sprite)'

 

Supply a damage amount and a sprite (Weapons/Misc ID #) to InitD[1] and InitD[2]


  • Bagu likes this

#14 Bagu

Bagu

    Fandomizer

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

Posted 18 July 2020 - 12:05 PM

Thank you
...I'll try that now
Where exactly should I add the 'spk->Damage = dmg;'
and 'spk->UseSprite(sprite)' lines?


Edited by Bagu, 18 July 2020 - 12:07 PM.


#15 Emily

Emily

    Scripter / Dev

  • ZC Developers
  • Pronouns:She / Her

Posted 18 July 2020 - 12:25 PM

right where the other 'spk->' lines are





Also tagged with one or more of these keywords: LWeapon Script, 2.55

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users