Jump to content

Learning scripting & Player Kill Tracker


Nepro

Recommended Posts

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?

Link to comment

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.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use