oc3 Posted September 1, 2014 Share Posted September 1, 2014 Time to beg for help again! This script is for a large boulder that when it strikes the player or NPC, causes them to fly backward as a ragdoll and after 3 seconds get up. Everything else about the script works Fine for now. The only part I need help with is knocking out the actor. The boulder pushes them back a bit but does not do the ragdoll thing....Thanks! EDIT: Don't pay too much attention to the indentation. The editor F***ed it all up when I pasted. I fixed it the best I could, but the editor is seriously lacking in usability. scn CTMBoulderScriptfloat fTrapDamagefloat flevelledDamagefloat fTrapPushBackfloat fTrapMinVelocityfloat fTrapDeathPushBackshort bTrapContinuousshort activatedShort BaseFatigueshort dooncefloat hitTimerfloat TrapTimer ; Starts when actor is hitbegin onactivateset fTrapPushBack to 2000set fTrapDeathPushBack to 4000set fTrapMinVelocity to 80set bTrapContinuous to 0set fTrapDamage to 95set flevelledDamage to 1.1set activated to 1set hitTimer to 12.5 ; To time the sounds and hit shader to the tempo of the stoneset TrapTimer to 0endBegin GamemodeTrapUpdate If activated == 1 Set BaseFatigue to GetActorValue Fatigue ModActorValue Fatigue -100 if hitTimer > 0 set hitTimer to hitTimer - GetSecondsPassed set TrapTimer to TrapTimer + GetSecondsPassed if doonce == 0 PlaySound CTMStoneRoll set doonce to 1 endif If TrapTimer > 3 ModActorValue Fatigue BaseFatigue endif if hitTimer <= 12.4 && hitTimer >= 12.35 TriggerHitShader .7 endif if hitTimer <= 10.52 && hitTimer >= 10.47 TriggerHitShader 3 endif if hitTimer <= 4.25 && hitTimer >= 4.2 TriggerHitShader 1.7 endif if hitTimer <= 4.25 ; It has hit the wall and is moving slowly by then set fTrapPushBack to 1000 set fTrapMinVelocity to 50 set fTrapDamage to 10 endif if hitTimer <= 0 set activated to 2 endif endif endifendbegin onReset Reset3DState Set doonce to 0 set activated to 0 set hitTimer to 0end Link to comment Share on other sites More sharing options...
oc3 Posted September 2, 2014 Author Share Posted September 2, 2014 (edited) This may not be possible as I intended. It looks like the trapupdate system is hard coded to only allow certain special variables for trap damage. I was hoping that by putting the modactorvalue function under trapupdate that it would work without an actor reference (since the trap already knows what hit it) but it doesn't work. Unfortunately, I can't even use getactionref to find out what is in contact with the trap since that is only useful inside an onactivate block.And since the player and other creatures are both present, the script must know who hit the boulder to use modav. I wonder if anyone knows how to modify the trapupdate system to allow new variables like pushback pushactoraway or something else that would give a ragdoll effect. Edited September 2, 2014 by oc3 Link to comment Share on other sites More sharing options...
Recommended Posts