Jump to content

Need Help With Scripting


Recommended Posts

I am working on a resident evil style mod, and i wanted the zombies to only die when the head is removed, so i made everything but the head heal instantly and made this script but it won't save, and that means there is a problem. i don't know what?

here is the script

 

scn 00zombscrpt

 

Begin

 

If (IsLimbGone 0 12 == 1)

SetActorRefEssential 0;

KillActor Player 1;

Endif

 

End

i am very new to scripting and i just copied some things, but anyway if anyone can help, please do.

Link to comment
Share on other sites

Well, first of all, you don't have a begin block. I assume this script is attached to the actor you want it to work with? If so, you'll want to put a "Begin GameMode" at the start.

 

Second, "SetActorRefEssential0" doesn't make sense. It should read something like,

SetEssential ActorRef 0

also, if that isn't your zombie's editor id, it won't work.

 

Thirdly, you're using "IsLimbGone" incorrectly. It should read,

If  IsLimbGone 12 1

however, that would mean that the script would work if part of their right leg was missing.

 

Finally, you don't need the "1" at the end of the "KillActor" function. It would just make the zombie's head explode, which would be odd if you've taken it off. That said, the "1" shouldn't actually stop your script from working an if you want the head to explode, then feel free to ignore this point.

 

Might I suggest doing a couple of tutorials on scripting if you're new to it? It'll help a lot both in the long and the short term. Anyway, I hope I've been of some assistance and I wish you luck with your mod! :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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