Duke4.net Forums: Frozen by a custom projectile bug - Duke4.net Forums

Jump to content

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

Frozen by a custom projectile bug  "How are you looking at him while you're frozen, Duke?"

User is offline   Jolteon 

#1

So yesterday, I created a new projectile for a custom enemy (The Ice Mind Blast for the blue Octabrain), and as such, I made it so if Duke were to be killed by this projectile, he would become frozen like with the freezer. But however, when he becomes frozen from the Ice Mind Blast, he would end up looking at the enemy who froze him. While normally this would happen when Duke is killed by an enemy, but this doesn't occur with the freezer at all.

Here's an comparison. Here's what happens when an Ice Snake head freezes Duke with the Freezer.

Attached Image: duke0207.png

Now here's what happens when Duke becomes frozen by an Blue Octabrain's Ice Mind blast.

Attached Image: duke0208.png Attached Image: duke0209.png

As you can see, Duke keeps looking at the Ice Octabrain despite he is frozen, like as if he's dead, but he isn't (At least not yet ofcourse).

BTW I'm using r5568.
0

User is offline   Mark 

#2

Are you using custom con files? If so, you might have a "faceplayer" command that needs to be disabled or adjusted for your situation.
0

User is offline   Jolteon 

#3

View PostMark., on 11 May 2017 - 11:18 AM, said:

Are you using custom con files? If so, you might have a "faceplayer" command that needs to be disabled or adjusted for your situation.


Yes. I am using custom con files. I'll try to take a look at it when I can, see if I did anything wrong.
0

User is offline   Mark 

#4

I read your original post too fast. Its the player that is doing the facing. My solution was for the enemy facing the player. Forget my other post. :(

Look in GAME.CON about 1/2 way down in the actor APLAYER code. It starts out with code dealing with the freezer. Compare your new code to that. Also I seem to remember some time within the last couple of weeks I was going through the wiki and read something about a command to freeze the player in place.

This post has been edited by Mark.: 11 May 2017 - 12:36 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#5

In the player actor, before any lines that say "ifhitweapon" add a line like this:

ife sprite[].htpicnum ICEMINDBLAST seta[].htpicnum FREEZEBLAST


Obviously, change the label to the actual label for your projectile!

This line will insure that the player actor will use whatever code is already in place for the freezer (hardcoded or otherwise), so you don't need any code of your own. At that point you should also delete any special freezing code you may have written for your own projectile, since it wouldn't be used anyway.
1

User is offline   Mark 

#6

I think its about time that Trooper Dan sets aside some time every week for a live interactive Q and A session for con code help. :(

This post has been edited by Mark.: 11 May 2017 - 12:43 PM

1

User is offline   Jolteon 

#7

View PostTrooper Dan, on 11 May 2017 - 12:36 PM, said:

In the player actor, before any lines that say "ifhitweapon" add a line like this:

ife sprite[].htpicnum ICEMINDBLAST seta[].htpicnum FREEZEBLAST


Obviously, change the label to the actual label for your projectile!

This line will insure that the player actor will use whatever code is already in place for the freezer (hardcoded or otherwise), so you don't need any code of your own. At that point you should also delete any special freezing code you may have written for your own projectile, since it wouldn't be used anyway.


That did the trick. :(

Attached Image: duke0210.png

I just originally copied the player getting hit by the freezer in the player code and just changed it with the new projectile. But this defiantly helps a lot. Thank you so much once again! :(
1

User is offline   Danukem 

  • Duke Plus Developer

#8

Hooking into hardcoded behavior is often an efficient way to achieve desired effects. In this case, to lock the player's view, you could also try these lines:

setp[].ang player[].oang // sets angle to angle from the previous tic
setp[].horiz player[].ohoriz // sets up/down view angle to one from previous tic
1

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