Jump to content

oh look, a script that doesn't work...


Sabat9

Recommended Posts

i'm askin for help on a couple boards, so sorry if you read this elsewhere.

 

 

so what i'm trying to do is set a "trap" on a chest, that makes a ghost appear and attack the player. I'm using ARChest01 as the base, and attaching a script to it. The creature is set up in a room in the cell separate from the main part, to be effectively "summoned" when the chest is opened.

 

here is the script ive come up with so far, bashed together from two separate tutorials.

 

(Once in game, nothing happens with the chest, it won't even open. I get the bag symbol that lets me know it's a container, but that's it.)

 

 

 

 

 

ScriptName AAAghostsummontrap

 

 

ref DisturbedSpirit

 

short controlvar

short button

 

begin onactivate

 

If controlvar == 0

set DisturbedSpirit to AAAtrapghost.createfullactorcopy

Messagebox "Do you want to open the vessel?", "yes", "no"

Set controlvar to 1

ElseIf controlvar > 1

Activate

EndIf

End

 

begin gamemode

 

set Button to getButtonPressed

 

if controlvar == 1 && button == 0

DisturbedSpirit.moveto ghosttrapmarker

Message "A Spirt has been disturbed!"

playsound NPCDemonSoundAttack

endif

set controlvar to 0

Return

elseif controlvar == 1 && button == 1

set controlvar to 0

Return

endif

End

 

 

 

 

been workin on this for a couple hours, and this is my first attempt at an actual script...help would be appreciated!

 

 

thanks!

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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