Jump to content

Photo

Pol Voice EX


  • Please log in to reply
7 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 01 April 2023 - 01:27 PM

Hello. It was been a long time since i didn't posted there.

I wish to ask a request of a enemy script called "Pol Voice EX" (Or simply Pol Voice (Explode))

I wanted to have a Pol Voice that would make explosions upon landing (i tried to do it with fire but it went hell when multiple Pol Voice is in the same room.).
Also i wanted to make them explode when they dies like Bombchuus, but the problem is that nothing happens except a normal death. Hince is kinda why i wanted to ask a script request like that.

I have already made alot of EX enemies for testing purposes and all i miss is those Pol Voices versions.

#2 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 01 April 2023 - 10:24 PM

This?

//Constant Walk. Every Nth frame, he jumps. His every Mth jtmp is higher than normal.

//Random rate, hunger, homing factor, step speed are used. If Weapon Damage is >0, this enemy will create explosion after landing every jump. Also explodes on death.
//Attribute 0 - normal jump height.
//Attribute 1 - max jump height
//Attribute 2 - delay between jumps, in frames, counted after landing.
//Attribute 3 - every X jump is big one.

ffc script TweeterSMB2{
	void run(int enemyID){
		npc ghost = Ghost_InitAutoGhost(this, enemyID);
		
		int HF = ghost->Homing;
		int HR = ghost->Haltrate;
		int RR = ghost->Rate;
		int HNG = ghost->Hunger;
		int SPD = ghost->Step;
		int WPND = ghost->WeaponDamage;
		
		int minjump = Ghost_GetAttribute(ghost, 0, 2);
		int maxjump = Ghost_GetAttribute(ghost, 1, 3);
		int jumpdelay = Ghost_GetAttribute(ghost, 2, 20);
		int jumpcount = Ghost_GetAttribute(ghost, 3, 3);
		
		//ghost->Extend=3;
		
		Ghost_SetFlag(GHF_NORMAL);
		
		int State = 0;
		int haltcounter = -1;
		int jumpcounter = jumpdelay;
		int jc = jumpcount;
		int OldZ=0;
		
		while(true){
			if (State==0){
				haltcounter = Ghost_ConstantWalk4(haltcounter, SPD, RR, HF, HNG);
				if (jumpcounter==0 && Ghost_Z==0){
					if (jc==1) Ghost_Jump = maxjump;
					else Ghost_Jump = minjump;
					jc--;
					if (jc==0)jc = jumpcount;
					jumpcounter = jumpdelay;
				}
				else if (Ghost_Z==0){
					if (WPND>0 && OldZ>Ghost_Z){
						eweapon e = FireAimedEWeapon(EW_BOMBBLAST, Ghost_X-16, Ghost_Y+(Ghost_TileHeight-1)*8, 0, 0, WPND, -1, -1, EWF_ROTATE);
					}
					jumpcounter--;
				}
			}
			OldZ=Ghost_Z;
			if (!Ghost_Waitframe(this, ghost, false, false)){
				if (WPND>0) eweapon e = FireAimedEWeapon(EW_SBOMBBLAST, Ghost_X-16, Ghost_Y+(Ghost_TileHeight-1)*8, 0, 0, WPND, -1, -1, EWF_ROTATE);
				Quit();
			}
		}
	}
}


#3 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 02 April 2023 - 08:17 AM

This one could work just fine. Do you have a test quest for this one ? Just to see how it works, and how i can apply that in my quest.

#4 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 02 April 2023 - 12:13 PM

This one could work just fine. Do you have a test quest for this one ? Just to see how it works, and how i can apply that in my quest.

https://drive.google...iew?usp=sharing



#5 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 02 April 2023 - 02:12 PM

thanks



#6 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 02 May 2023 - 08:22 PM

Ok so i've tested it. There's a few flaws with the enemies.

The first thing i've noticed is that they doesn't have the Pol Voice animation like the normal Pol Voices does when they jumps.

The second thing i've noticed is that, when the jumps, they don't actually jump through the solid combo like the normal Pol Voices does. As result, some of them are stuck at some location of the room.

The other thing i've noticed is that the explosion is not centered right where the enemy landed which is weird.

I was wondering if this can be fixed somehow.


Edited by Sans, 02 May 2023 - 08:24 PM.


#7 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 09 May 2023 - 08:14 PM

I was wondering if this can be fixed somehow.

//Constant Walk. Every Nth frame, he jumps. His every Mth jtmp is higher than normal.

//Random rate, hunger, homing factor, step speed are used. If Weapon Damage is >0, this enemy will create explosion after landing every jump. Also explodes on death.

ffc script TweeterSMB2{
	void run(int enemyID){
		npc ghost = Ghost_InitAutoGhost(this, enemyID);
		
		int HF = ghost->Homing;
		int HR = ghost->Haltrate;
		int RR = ghost->Rate;
		int HNG = ghost->Hunger;
		int SPD = ghost->Step;
		int WPND = ghost->WeaponDamage;
		
		int minjump = Ghost_GetAttribute(ghost, 0, 2);//Attribute 0 - normal jump height.
		int maxjump = Ghost_GetAttribute(ghost, 1, 3);//Attribute 1 - max jump height
		int jumpdelay = Ghost_GetAttribute(ghost, 2, 20);//Attribute 2 - delay between jumps, in frames, counted after landing.
		int jumpcount = Ghost_GetAttribute(ghost, 3, 3);//Attribute 3 - every X jump is big one.
		int jumpsfx = Ghost_GetAttribute(ghost, 4, 0);//Jump SFX
		
		//ghost->Extend=3;
		
		Ghost_SetFlag(GHF_NORMAL);
		
		int State = 0;
		int haltcounter = -1;
		int jumpcounter = jumpdelay;
		int jc = jumpcount;
		int OldZ=0;
		int origtile = ghost->OriginalTile;
		
		while(true){
			if (State==0){
				haltcounter = Ghost_ConstantWalk4(haltcounter, SPD, RR, HF, HNG);
				if (jumpcounter<=0 && Ghost_Z==0){
					Game->PlaySound(jumpsfx);
					if (jc==1) Ghost_Jump = maxjump;
					else Ghost_Jump = minjump;
					jc--;
					if (jc==0)jc = jumpcount;
					jumpcounter = jumpdelay;
				}
				else if (Ghost_Z==0){
					if (WPND>0 && OldZ>Ghost_Z){
						eweapon e = FireAimedEWeapon(EW_BOMBBLAST, Ghost_X, Ghost_Y, 0, 0, WPND, -1, -1, EWF_ROTATE);
					}
					jumpcounter--;
				}
			}
			if (Ghost_Z>0)ghost->OriginalTile = origtile+20;
			else ghost->OriginalTile = origtile;
			OldZ=Ghost_Z;
			if (!Ghost_Waitframe(this, ghost, false, false)){
				if (WPND>0) eweapon e = FireAimedEWeapon(EW_SBOMBBLAST, Ghost_X, Ghost_Y, 0, 0, WPND, -1, -1, EWF_ROTATE);
				Quit();
			}
		}
	}
} 

https://drive.google...iew?usp=sharing

Jumping animation uses tiles below walking animation.


Edited by Alucard648, 09 May 2023 - 08:15 PM.


#8 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 10 May 2023 - 07:41 PM

Thanks alot.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users