#  ![](https://www.realm667.com/media/kunena/topic_icons/realm667_repo/user/rep_approved.png) \[SUBMISSION\] Cryotron

##

- **CaptainToenail**
- ![CaptainToenail's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar11652.png?1696711803) Topic Author
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 229
-
-

   1 year 11 months ago - 1 year 11 months ago [\#12342](#12342) by CaptainToenail  *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12342 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")* was created by *CaptainToenail*

 I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of corners and corridors. It's weapon is similar in theme to the Ice Crystal Gun, maybe they originated from the same UAC lab?

Information:
Name: Cryotron
Difficulty: Medium
Connections: None
Summon: Cryotron
Melee: None
Distance: Projectile spread
Type: Demon, Cybernetic, Ice
Brightmaps: None
Actor modification: None
ACS: None

Credits:
Code: Captain Toenail, Gothic
GLDefs: lights.pk3
Sounds: DukeNukem3D, wrw.wad, Volition, TheDarkArchon
Sprites: Amuscaria, Doom, DukeNukem3D, wrw.wad
Sprite Edit: Captain Toenail
Idea Base: Mr Freeze from Batman &amp; Robin film, Duke Nukem 3D's FreezeThrower,
 Xim's FreezeRifle

Description:
 An Arachnotron encased in cryogenic technology.

 Its frostcannon launches a deadly spread of rebounding ice balls.

 Resistant to ice damage.

 [ ![ICEAA1D1.png](https://www.realm667.com/forum/attachment/2405) ](https://www.realm667.com/forum/attachment/2405 "ICEAA1D1.png")

####  File Attachment:

 File Name: [ Cryotron.zip](https://www.realm667.com/forum/attachment/2430 "Cryotron.zip")
 File Size:342.14 KB

 Last edit: 1 year 11 months ago by CaptainToenail. Reason: Updated file

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **DeVloek**
- ![DeVloek's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar11145.png?1542216928)
- Arachnotron
- ![Arachnotron](https://www.realm667.com/media/kunena/ranks/rank_10_arachno.png)

 Less More- Posts: 416
-
-

   1 year 11 months ago - 1 year 11 months ago [\#12344](#12344) by DeVloek  Replied by *DeVloek* on topic *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12344 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")*

 That's a cool concept ![;-)](https://www.realm667.com/media/kunena/emoticons/cacwnk.gif ";-)")

There are some warnings on startup:
​​​​​​Script warning, "Cryotron.pk3:zscript" line 176: Accessing deprecated function A_ChangeFlag - deprecated since 2.3.0, Use 'b = [true/false]' instead
Script warning, "Cryotron.pk3:zscript" line 177: Accessing deprecated function A_ChangeFlag - deprecated since 2.3.0, Use 'b = [true/false]' instead

you can use
**bXFLIP = randompick(true,false);**
and
**bYFLIP = randompick(true,false);**
respectively

 Last edit: 1 year 11 months ago by DeVloek.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **CaptainToenail**
- ![CaptainToenail's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar11652.png?1696711803) Topic Author
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 229
-
-

   1 year 11 months ago [\#12346](#12346) by CaptainToenail  Replied by *CaptainToenail* on topic *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12346 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")*

 Thank you. Updated.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **Gothic**
- ![Gothic's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar320.png?1619787674)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 1329
-
-
-

   1 year 11 months ago [\#12390](#12390) by Gothic  Replied by *Gothic* on topic *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12390 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")*

 We have a spider infestation.
Everything works fine except when if it gets morphed or dies morphed, it still spawns vapor clouds. I tried doing a check in the vapor spawner: Code:

Spawn: TNT1 A 1 { if(master &amp;&amp; !master.MorphFlags) A_SpawnItemEx("Cryotron_Vapour",random(0,32),0,random(24,40),0,0,frandom(0.0,0.3),random(0,360),0,128); } TNT1 A 0 A_Warp(AAPTR_MASTER,0,0,0,0,WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE,"Spawn"); Stop;

When the morphed monster dies, the vapor stops spawning but the spawner isn't really removed. I don't know how to resolve this.
I know it would be much easier to manage if the clouds come from the Cryotron itself instead of an external class.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **CaptainToenail**
- ![CaptainToenail's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar11652.png?1696711803) Topic Author
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 229
-
-

   1 year 11 months ago - 1 year 11 months ago [\#12393](#12393) by CaptainToenail  Replied by *CaptainToenail* on topic *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12393 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")*

 I ported the Porkulator into Doom to test this, and I am seeing odd behaviour.

If you morph a monster, for example DoomImp, you will get the Pig but you will also get an invisible 'ghost monster' that still makes sounds and shoots fireballs. Killing the pig will stop the ghost. This is with GZDoom 4.12.2 - is this a bug?

What is a property in zscript you can check to tell if a monster is currently morphed? Is it if the actor's MorphFlags are greater than zero? I could override tick() and put the vapour spawn function in there on the spider itself, if I can check if it is currently alive and not morphed.

 Last edit: 1 year 11 months ago by CaptainToenail.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **Gothic**
- ![Gothic's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar320.png?1619787674)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 1329
-
-
-

   1 year 11 months ago [\#12394](#12394) by Gothic  Replied by *Gothic* on topic *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12394 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")*

> [ CaptainToenail wrote: ](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12393)

>
>  If you morph a monster, for example DoomImp, you will get the Pig but you will also get an invisible 'ghost monster' that still makes sounds and shoots fireballs. Killing the pig will stop the ghost. This is with GZDoom 4.12.2 - is this a bug?
>
> What is a property in zscript you can check to tell if a monster is currently morphed? Is it if the actor's MorphFlags are greater than zero? I could override tick() and put the vapour spawn function in there on the spider itself, if I can check if it is currently alive and not morphed.

The morph bug has been fixed in the dev builds, I'm using g4.13-pre110-whatever.
You can use the virtual functions (Pre/Post)(Morph/Unmorph) to change properties at those moments: Code:

 bool morbed; override void PreMorph(Actor mo, bool current) { if(!current) { morbed = true; } } override void PostUnMorph(Actor mo, bool current) { if(current) { morbed = false; } } override void Tick() { super.Tick(); if(!isFrozen() &amp;&amp; !bCORPSE &amp;&amp; !morbed) { A_SpawnItemEx("Cryotron_Vapour",random(0,32),0,random(24,40),0,0,frandom(0.0,0.3),random(0,360),0,128); } }

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **CaptainToenail**
- ![CaptainToenail's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar11652.png?1696711803) Topic Author
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 229
-
-

   1 year 11 months ago [\#12399](#12399) by CaptainToenail  Replied by *CaptainToenail* on topic *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12399 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")*

 That did the trick Gothic - I have updated the file with your code

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **Gothic**
- ![Gothic's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar320.png?1619787674)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 1329
-
-
-

   1 year 11 months ago [\#12401](#12401) by Gothic  Replied by *Gothic* on topic *[\[SUBMISSION\] Cryotron](https://www.realm667.com/forum/closed-submissions/2129-submission-cryotron#12401 "I thought the Cryocubus was really neat and could use a friend so I made an ice-themed Arachnotron. This one launches bouncing ice balls in a spread pattern. Can be quite chaotic in areas with lots of...")*

 [ Added](https://www.realm667.com/index.php?option=com_content&view=article&id=2719)
Forgot to mention, I took that method from Rifleman's monsters, so credit goes to him as well.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL2Nsb3NlZC1zdWJtaXNzaW9ucy8yMTI5LXN1Ym1pc3Npb24tY3J5b3Ryb24=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

[Powered by](https://www.realm667.com/forum/credits) [Kunena Forum](https://www.kunena.org)
