Duke4.net Forums: Shrunk monsters killed ! - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Shrunk monsters killed !  "Kill a monster otherwise (gameplay added)"

User is offline   F!re-Fly 

#1

Good evening everyone ! I'm asking for your help again, to know how to kill a narrowed monster, other than the pstomp value.

The original Liztroop already has this value, with a bug that I corrected. But I do not know how to do it for other monsters.

Thank you
0

User is offline   Danukem 

  • Duke Plus Developer

#2

Changing the size of an actor does nothing to prevent it from being killed in the usual ways. What prevents it from being killed is when you also change the cstat to remove the hitscan bit, or if you make the shrunken actor bypass the normal damage processing code. You need to look carefully at what the code is doing and make changes. There's no secret command or formula.
0

User is offline   F!re-Fly 

#3

I should surely look at the Liztroop code.
0

User is offline   F!re-Fly 

#4

The code of the shrunken monsters, which are killed by other weapons is fixed ! The main value was "ifhitweapon"

This is how I proceeded:

LIZTROOP CODE

state checksquished

ifai AITROOPPSXSHRUNK break
ifhitweapon
state checktroophitpsx
ends

NOTE : this code was found in the wiki, to fix a "typing animation" bug.

And that's how I proceeded for another monster:

PIGCOP

state pigshrinkstatepsx
ifcount SHRUNKDONECOUNT
ai AIPIGCOPPSXSEEKENEMY
else
ifcount SHRUNKCOUNT
sizeto 48 40
else
state genericshrunkcode
{
state checksquished
ifai AIPIGCOPPSXSHRINK break
ifhitweapon
state checkpighitstatepsx
}
ends

The result is perfect! I'll see how other monsters behave.
0

User is offline   F!re-Fly 

#5

WTF ???? IT'S NOT BELIEVABLE AT ALL !!!

The codes that worked after four tries, do not WORK any more !!!!

I do not understand absolutely, and totally not the problem. It's incredible !!! How does a code that works, does not work after three seconds ?

I did not do anything more, nor change anything. I simply add these codes above.
0

User is offline   F!re-Fly 

#6

Hello Troop Dan !

I can not use both codes at the same time:

ifhitweapon
state checkpighitstatepsx

(To kill a monster otherwise).

and

ifai AIPIGCOPPSXSHRINK break (prevent the narrowing monsters from attacking the player).

By placing them together, one or the other does not work. I do not know if I have to add them in the "state pigshrinkstatepsx" before the "useractor enemy" or directly in the code "useractor enemy" in "else ifai AIPIGCOPPSXSHRINK "
0

User is offline   F!re-Fly 

#7

I finally found !

In "state checkpighitstate" we must add "ifai AIPIGSHRINK break" like this:

ifwasweapon GROWSPARK
sound EXPANDERHIT
else
ifai AIPIGSHRINK break
ifrnd 32
ai AIPIGHIT

and in "actor PIGCOP" and action ifai "AIPIGSHRINK" add this:

else
ifai AIPIGSHRINK
{ ifhitweapon state checkpighitstate
state pigshrinkstate
break
}

And it works better than I hope.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked


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