Monster attack that shortly freezes player?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Monster attack that shortly freezes player?
Can something like that be done?
- .+:icytux:+.
- Posts: 2661
- Joined: Thu May 17, 2007 1:53 am
- Location: Finland
Re: Monster attack that shortly freezes player?
give the player a inventory item that executes a script that does SetPlayerProperty on the activator. and give the property PROP_TOTALLYFROZEN, Delay(35*6); or whatever you like then call SetPlayerProperty once more to deactivate it.Tormentor667 wrote:Can something like that be done?
- Zhs2
- Posts: 1301
- Joined: Fri Nov 07, 2008 3:29 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Location: Maryland, USA, but probably also in someone's mod somewhere
- Contact:
Re: Monster attack that shortly freezes player?
Perhaps a temporary item that calls a color change on the player's HUD, as well?
- Macil
- Posts: 2529
- Joined: Mon Mar 22, 2004 7:00 pm
- Preferred Pronouns: He/Him
- Location: California, USA. Previously known as "Agent ME".
- Contact:
Re: Monster attack that shortly freezes player?
Make a new player actor that has a custom pain state which freezes the player. You might have to call an ACS script inside the pain state to do exactly what you want.
- .+:icytux:+.
- Posts: 2661
- Joined: Thu May 17, 2007 1:53 am
- Location: Finland
Re: Monster attack that shortly freezes player?
sounds like a better solution if you could freeze the player without acs.Agent ME wrote:Make a new player actor that has a custom pain state which freezes the player. You might have to call an ACS script inside the pain state to do exactly what you want.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Monster attack that shortly freezes player?
I tried it but without any success... anyone able to give me a working example?
-
- Posts: 3975
- Joined: Fri Jul 06, 2007 9:16 am
Re: Monster attack that shortly freezes player?
The creeper stun balls from GvH and the Tazer from 007 Goldeneye TC both do this
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Monster attack that shortly freezes player?
The GvH scripts are only the as compiled versions and I don't have the 007 TC, links someone?
- XutaWoo
- Posts: 4005
- Joined: Sat Dec 30, 2006 4:25 pm
- Location: beautiful hills of those who are friends
- Contact:
Re: Monster attack that shortly freezes player?
Have you tried looking at the GLOBAL script that's in the main dictionary, not the scripts dictionary?Tormentor667 wrote:The GvH scripts are only the as compiled versions
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Monster attack that shortly freezes player?
Yes, now I did but it doesn't seem to work for me... here is what Cutmanmike wrote for the Marine class:
...and the correspdonding script looks like this:
If I put that up exactly the way Cutman did this in my own project, it doesn't work. I get the "fadeto" screen change but I do not get any change in terms of my movement.
Code: Select all
Pain.Creepstun:
PLAY G 0 A_Pain
PLAY G 18 ACS_ExecuteAlways(986,0)
Goto Spawn
Code: Select all
script 986 (void) // Creeper stun blast effect
{
SetPlayerProperty (0, 1, 0);
fadeto(255, 255, 255, 0.03, 0.0);
Delay(48);
fadeto(255, 255, 255, 0.0, 0.0);
SetPlayerProperty (0, 0, 0);
}
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Monster attack that shortly freezes player?
Ah.. now I know why, I have this second script running:
Now, how to combine both? 
Code: Select all
//Stop moving while aiming
script 800 ENTER
{
int buttons;
while (TRUE)
{
buttons = GetPlayerInput(-1, INPUT_BUTTONS);
if (buttons & BT_ALTATTACK)
{
GiveInventory("PlayerFreezer", 1);
SetPlayerProperty(0,1,PROP_FROZEN);
}
else
{
TakeInventory("PlayerFreezer", 99999999);
SetPlayerProperty(0,0,PROP_FROZEN);
}
delay(1);
}
}

- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Monster attack that shortly freezes player?
Hm... tried it and it seems to be impossible... but what about spawning a dummy sector directly into the player that stops its movement for a while? Has something like that already been tried?
*EDIT*
Hah, that actually works ^^
*EDIT*
Hah, that actually works ^^
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Monster attack that shortly freezes player?
Try something like this:
Code: Select all
int freezecount;
//Stop moving while aiming
script 800 ENTER
{
int buttons, lastbuttons;
while (TRUE)
{
lastbuttons = buttons;
buttons = GetPlayerInput(-1, INPUT_BUTTONS);
if ((buttons & BT_ALTATTACK) && !(lastbuttons&BT_ALTATTACK))
{
GiveInventory("PlayerFreezer", 1);
SetPlayerProperty(0,1,PROP_FROZEN);
freezecount++;
}
else if(!(buttons & BT_ALTATTACK) && (lastbuttons&BT_ALTATTACK))
{
TakeInventory("PlayerFreezer", 99999999);
freezecount--;
if(freezecount == 0)
SetPlayerProperty(0,0,PROP_FROZEN);
}
delay(1);
}
}
script 986 (void) // Creeper stun blast effect
{
SetPlayerProperty (0, 1, 0);
freezecount++;
fadeto(255, 255, 255, 0.03, 0.0);
Delay(48);
fadeto(255, 255, 255, 0.0, 0.0);
freezecount--;
if(freezecount == 0)
SetPlayerProperty (0, 0, 0);
}
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Monster attack that shortly freezes player?
Look above, I already found a much easier method
But thanks though for your help
