Duke4.net Forums: Resize of Mini Bosses - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Resize of Mini Bosses

User is offline   HELLMOUSE 

#1

How do I resize a mini boss? I would like to resize a mini boss to 64 by 64. I've done stuff like:


actor BOSS2 BOSS2STRENGTH
 ifspritepal 3
   ifaction ABOSS2SHOOT
    sizeat 64 64
  fall 
  state boss2code 
enda



but the boss starts out small and gets bigger when that action (ABOSS2SHOOT) executes. I want the mini boss to start out at 64 64 when he is standing there doing nothing. I'm not sure what "state" or "action" to slip the lines of "ifspritepal 3" and "sizeat 64 64" under.

The other problem is after resizing, he gets hit by his own missiles from when he does my modification of the "COOLEXPLOSION1" attack.


ifpdistl 4096 
   shoot COOLEXPLOSION1
else
 {
  ifspritepal 0
     {
        globalsound RPG_SHOOT
	shoot RPG
        shoot RPG
     }
  ifspritepal 3
     {
 	 globalsound RPG_SHOOT
	 shoot RPG
     }
 }



He's fine as long as there is no resizing.

In summary there are two problems:
1) How to resize a mini boss when they are waiting to "see" Duke, not when they start moving?
2) How do I prevent a mini boss's self missile collision?


Hopefully when problem 1 is addressed this will solve problem 2.
0

User is offline   Trooper Dan 

  • Duke Plus Developer

#2

appendevent EVENT_SPAWN

ifactor BOSS2 
  ifspritepal 3 sizeat 64 64

endevent



The self-hitting problem is a difficult one. Some of us have complained about it, at one point there was a fix applied, it never really worked or in any case it's certainly broken again. It can happen with certain sprites combined with certain projectiles at certain sizes. I have a solution that I use in my own code but it's a nasty hack and I don't want to have to explain it.

EDIT: consult the Eduke32 wiki if you have questions about event code.

This post has been edited by Trooper Dan: 04 May 2020 - 12:46 AM

2

User is offline   necroslut 

#3

View PostHELLMOUSE, on 03 May 2020 - 09:44 PM, said:

How do I resize a mini boss? I would like to resize a mini boss to 64 by 64. I've done stuff like:

I haven't messed around much with the bosses, but typically enemies' initialization code is put under the "ifai 0" bracket, which is where no ai code has been run yet.
0

User is offline   Trooper Dan 

  • Duke Plus Developer

#4

View Postnecroslut, on 04 May 2020 - 12:45 AM, said:

I haven't messed around much with the bosses, but typically enemies' initialization code is put under the "ifai 0" bracket, which is where no ai code has been run yet.


That won't work. Any code you put inside the actor will not run until the actor "wakes up" which doesn't happen until they see the player.
0

User is offline   necroslut 

#5

View PostTrooper Dan, on 04 May 2020 - 12:47 AM, said:

That won't work. Any code you put inside the actor will not run until the actor "wakes up" which doesn't happen until they see the player.

Then won't you just have to resize the sprite in Mapster?
0

User is offline   Trooper Dan 

  • Duke Plus Developer

#6

View Postnecroslut, on 04 May 2020 - 01:47 AM, said:

Then won't you just have to resize the sprite in Mapster?


That would work for a useractor, assuming that you remember to size them all correctly, but I think BOSS2 is hardcoded to start at a certain size, which is why I posted the code I did right before your first reply.
1

User is offline   necroslut 

#7

View PostTrooper Dan, on 04 May 2020 - 02:46 AM, said:

That would work for a useractor, assuming that you remember to size them all correctly, but I think BOSS2 is hardcoded to start at a certain size, which is why I posted the code I did right before your first reply.

Yeah, I hadn't seen your post before I wrote my useless one.
0

User is offline   HELLMOUSE 

#8

 Trooper Dan, on 04 May 2020 - 12:44 AM, said:

appendevent EVENT_SPAWN

ifactor BOSS2 
  ifspritepal 3 sizeat 64 64

endevent



The self-hitting problem is a difficult one. Some of us have complained about it, at one point there was a fix applied, it never really worked or in any case it's certainly broken again. It can happen with certain sprites combined with certain projectiles at certain sizes. I have a solution that I use in my own code but it's a nasty hack and I don't want to have to explain it.

EDIT: consult the Eduke32 wiki if you have questions about event code.


Thanks that worked for the sizing issue!

I'm not that bothered by the RPG self collision thing. There are plenty of other projectiles I could use with the "sneezing of COOLEXPLOSION1's" for the mini boss.

The wall of missiles that puts the NME to shame still works perfectly fine for the normal Boss 2.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options