metamarx Posted February 10, 2009 Share Posted February 10, 2009 I'm having some scripting troubles. i'm trying to make a weapon, that when you equip you die. Ive tried"begin OnEquip player" with "player.GetDead" and "Kill player" but nothings worked. Any ideas? :confused: Link to comment Share on other sites More sharing options...
Smosh Posted February 10, 2009 Share Posted February 10, 2009 I've tried a few things to no avail :( I'd love to know the answer to this as well. Link to comment Share on other sites More sharing options...
Lingwei Posted February 10, 2009 Share Posted February 10, 2009 Player.getdead checks if the player is dead (which they obviously never will be since they are always alive. You usually use it to check if an npc or creature has been killed. E.g SimmsRef.getdead == 1 will check to see if Simms is dead and if he is then whatever comes next will run. The kill command uses the syntax player.kill not kill player. So if you wanted to kill Simms you would go SimmsRef.kill. In the future if you have simple scripting problems such as this you should first check the geck wiki for the scripting functions you are trying to use to make sure you are writing them correctly. Link to comment Share on other sites More sharing options...
Smosh Posted February 10, 2009 Share Posted February 10, 2009 Player.getdead checks if the player is dead (which they obviously never will be since they are always alive. You usually use it to check if an npc or creature has been killed. E.g SimmsRef.getdead == 1 will check to see if Simms is dead and if he is then whatever comes next will run. The kill command uses the syntax player.kill not kill player. So if you wanted to kill Simms you would go SimmsRef.kill. In the future if you have simple scripting problems such as this you should first check the geck wiki for the scripting functions you are trying to use to make sure you are writing them correctly. player.kill crashes my game. Link to comment Share on other sites More sharing options...
veliv Posted February 10, 2009 Share Posted February 10, 2009 player.kill crashes my game. Seems to work then ;) Link to comment Share on other sites More sharing options...
Smosh Posted February 10, 2009 Share Posted February 10, 2009 player.kill crashes my game. Seems to work then ;) :biggrin: Link to comment Share on other sites More sharing options...
metamarx Posted February 10, 2009 Author Share Posted February 10, 2009 player.kill crashes my game. Seems to work then ;) :biggrin:Thats great and all, but does it have to freeze the game? Link to comment Share on other sites More sharing options...
metamarx Posted February 10, 2009 Author Share Posted February 10, 2009 player.kill crashes my game. Seems to work then ;) :biggrin:Thats great and all, but does it have to freeze the game? Link to comment Share on other sites More sharing options...
Smosh Posted February 10, 2009 Share Posted February 10, 2009 I tried to set the players health to -1 using setav health but all that did was let me run around with -1 health and a maximum health of -1 Link to comment Share on other sites More sharing options...
metamarx Posted February 10, 2009 Author Share Posted February 10, 2009 Using "player.DamgeActorValue health" also freezes the game Link to comment Share on other sites More sharing options...
Recommended Posts