The idea I'm trying to implement is to expand on the player's ability to move stuff around with the "z" key. The idea I had was to give the player some sort of small axe or whatever that they can swing around to deal damage with by holding the "z" key (possibly while attacking with a standard weapon?). Well, lets face it. I have no idea what I'm doing when it comes to scripting.
Scriptname CollisionDamageScriptfloat fTrapDamagefloat fTrapPushBackfloat fTrapMinVelocityshort bTrapContinuousShort Triggeredbegin GameMode if triggered == 0 set fTrapDamage to 10 set fTrapPushBack to 128 set fTrapMinVelocity to 10 set bTrapContinuous to 0 set triggered to 1 elseif triggered == 1 Trapupdate endifEndBegin OnReset Set Triggered to 0end
Thats the code I've got right now to go on the aforementioned axe (I cannibalized it mostly from the script on some falling rock trap). I've tested it with various numbers for the Damage / PushBack / MinVelocity but for some reason its not working, and I'm not skilled enough with scripting to know why. Again, all I'm really looking for here is something that causes the scripted object to deal damage when it runs into something. Any help would be appreciated.
(On a side note, is there a way to check for a magic effect active on the character? And a way to get the magic effect off the player without removing it from their abilities list?)