CENTAX

New member
Joined
May 19, 2025
Messages
1
Reaction score
0
hello , i wanna create a gameover scene for my re/l4d2 mod but i am a total noob in coding so i asked ai for a overall look and this is what i have got :
Here's a CLEO script that prevents the game from triggering the normal "busted" or "wasted" sequence, allowing NPCs to continue attacking the player's corpse while the game world keeps running:

cleo

{$CLEO .cs}
0000:

while true
wait 0

if
0256: player $PLAYER_CHAR defined
then
if or
0118: actor $PLAYER_ACTOR dead
02BF: player $PLAYER_CHAR busted
then
// Prevent hospital/police station spawn
03CB: set_actor $PLAYER_ACTOR dead 0
02C0: store_player $PLAYER_CHAR wanted_level_to 0@
02C2: set_player $PLAYER_CHAR wanted_level_to 0@

// Keep corpse interactable
0223: set_actor $PLAYER_ACTOR health_to 1
03F3: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0

// Disable fade effects
016A: fade 0 time 0

// Force camera to follow corpse
015F: set_camera_position 0.0 0.0 0.0 rotation 0.0 0.0 0.0
0160: point_camera 0.0 0.0 0.0 switchstyle 2

// Prevent mission failure triggers
0330: set_player $PLAYER_CHAR infinite_run_to 1
01D3: actor $PLAYER_ACTOR stay_in_car_when_dead 1

// Make NPCs continue attacking
05D1: AS_actor -1 kill_actor $PLAYER_ACTOR

// Wait until player respawns manually
while true
wait 0
if
0AB0: key_pressed 57 // NUM9 to respawn
then
0223: set_actor $PLAYER_ACTOR health_to 100
01EB: set_player $PLAYER_CHAR can_move 1
016A: fade 1 time 1000
break
end
end
end
end
end

Key Features:​

  1. Death/Busted Prevention:
    • Blocks the normal death sequence with 03CB: set_actor $PLAYER_ACTOR dead 0
    • Maintains wanted level to keep cops aggressive
  2. Corpse Interaction:
    • Sets health to 1 to maintain a "barely alive" state
    • Removes all immunities so NPCs can keep attacking
  3. Camera Control:
    • Prevents camera from moving to default death view
    • Keeps focus on the player's body
  4. Manual Respawn:
    • Press NUM9 to respawn at full health
    • Fade effect for smooth transition
  5. NPC Behavior:
    • Forces all nearby NPCs to attack the corpse with 05D1
    • Cops will continue their assault routines
now the error i keep getting is Not enough actual parameters. Expected 3 params. 4 or 6 .... it would be great if you teach me or complete a part of the code for me. thanks .
 
Top