Silgrad Tower from the Ashes

Full Version: Need Scripting help!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay, i have been learning to script things for the game. Its great, i've made a button that creates a skeleton, which when dies comes back to life and duplicates itself. This happens everytime the skeleton dies, and after killing the skeleton, a message is sent to the player saying, 'oh well looks like you're *****'.

BUT enough of my successes. I have run into a BIG FAILURE!!!!

i want to make an object teleport from one source item to another. So, i thought id try the player.placeatme script command.

I changed the player to the items reference and then reference code (the code wasnt rejected). At the end i placed the code of the item i wanted to move!

UNFORTUNATELY!!!!! The game rejected the fact i wanted the item to have another item placed at it. Is there any other way i can get an object to move to a place OTHER THAN WHERE THE PLAYER IS STOOD???

If you are the guru of scripting, or maybe not the guru, but can DO THIS!!! PLEASE inform me how!!! (maybe even provide an example =-)).

THANKS FOR READING!!!
Hmm seems patience has solved the problem.

I no longer need a teleport script. I have changed my idea to a disable then enable script instead.

Ive written it, just havent got round to testing it yet Wink
Hmm after many attempts at disable and enable scripts.

I HAVE DONE IT!!!!

i redesigned the script so that it would ask the question to the player on whether to activate or disengage (familiar stargate terminology). Doing this made it SOOO much easier to make the wormhole appear and disappear. Im now currently working on the script so that the player cannot click on the stargate and activate the script!!!

Here is my new finished script!!!

scriptname LMdisableobjectNEWest

short button
short controlvar

begin onactivate

if isActionRef player == 1
return

elseif ( controlvar == 0 )

messagebox "What would you like to do?", "Activate stargate", "Disengage stargate", "what is a stargate?"
set controlvar to 1
endif

end

begin gamemode
if ( controlvar == 1)
set button to getbuttonpressed

if ( button == -1 )
return

elseif ( button == 0 )
enable
playsound ambthunder
message "the stargate has been enabled"
set controlvar to 0

elseif ( button == 1 )
disable
playsound ambthunder
message "the stargate has been disengaged"
set controlvar to 0

elseif ( button == 2 )
message "a stargate is an inter-space transportation method"
set controlvar to 0

endif

endif

end

........

and it works YAY!

StarGate