Nepro Posted January 18, 2017 Posted January 18, 2017 scriptname ZZMPlayerKillTrackerExecutiveScript ref victim ref AliveFlag ref killer Begin Gamemode set killer to player if victim.GetDead == 1 set AliveFlag to 0 else set AliveFlag to 1 endif if killer.IsCasting || killer.IsAttacking && victim.GetActorValue Health == 0 print $victim.GetRace + "was killed by player" endif end I am learning scripting and tried to make simple mod where it prints what race of the character player killed. I want to make kill trakcer mod that records the number of creatures/people player killed by race/gender etc. The above script for some reason doesn't want to work for me. What did I not specified in that script that isn't making it working?
mem4ob4 Posted January 19, 2017 Posted January 19, 2017 I am not seeing where you specify who the victim is. I am not sure if this is a quest script, object script, spell script, or user function so difficult to advice you. You may wish to go over the information in the construction set wiki on scripting. The GetPCMiscStat 5 and 6 may be one way to start looking at ways to accomplish your goal. Mem
Puuk Posted January 20, 2017 Posted January 20, 2017 Mem is right, you don't seem to have defined your victim. Your AliveFlag is also declared as a reference, that probably should be "short". Another good resource for scripting information is OBSE command documentation. What you might want to look at is "Event Handlers". You need Oblivion Script Extender though, which is quite mandatory in any kind of Oblivion scripting.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.