Jump to content

scripting


gengar807

Recommended Posts

Ok. That's easy enough.

 

First you need to make a clone of the button in the editor. Just rename it to something you like. Then place the cloned version in your render window where you want it. The reason for this is so that when you edit the script for the button you don't mess up the original button (which will most likely be in other locations in the game).

 

Then what you need to do is make sure the button is a persistant reference (click on it in the render window and make sure that box is checked) with a name. Let's call it AyleidSpellButton1 for the purposes of this (you can name it whatever you want).

 

The button should already have a script on it from copying it. This script tells the button that when it is pressed to play an animation and possibly other things. All you need to do is to put this line somewhere in between where it says

 

begin OnActivate and End

 

So it would like something like this in the onactivate codeblock.

 

begin onActivate

playgroup forward 1
       AyleidSpellButton1.Cast nameofspellhere Player

end

 

where the script has it's scname you need to change the name as well and make sure your new cloned button is using the new script. This will, again, stop all the other uses of the original script from using the new script changes.

Edited by jamochawoke
Link to comment
Share on other sites

  • Recently Browsing   0 members

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