Jump to content

script help


Sonck

Recommended Posts

hello,

i suck at scripting

could someone make me a script that pops up a menu and gives you the max amount of choises (i think there are 9)

ive tried to make one myself from constructionset wiki but it just doesnt work

it starts when u use an activator and it must give u a chose to teleport somewhere(that i know how)

pm it to me, ill give credits when the mod is finished and give u a kudo if u want it

thanks

Link to comment
Share on other sites

hello,

i suck at scripting

could someone make me a script that pops up a menu and gives you the max amount of choises (i think there are 9)

ive tried to make one myself from constructionset wiki but it just doesnt work

it starts when u use an activator and it must give u a chose to teleport somewhere(that i know how)

pm it to me, ill give credits when the mod is finished and give u a kudo if u want it

thanks

 

What is this Script to do, exactly?

 

I will need more details and descriptions if I can make this mod. :thumbsup:

Link to comment
Share on other sites

hello,

i suck at scripting

could someone make me a script that pops up a menu and gives you the max amount of choises (i think there are 9)

ive tried to make one myself from constructionset wiki but it just doesnt work

it starts when u use an activator and it must give u a chose to teleport somewhere(that i know how)

pm it to me, ill give credits when the mod is finished and give u a kudo if u want it

thanks

 

What is this Script to do, exactly?

 

I will need more details and descriptions if I can make this mod. :thumbsup:

 

here's the deal:

lets say i have a tower whith 9 floors. on each floor there will be a teleporter. if i activate a teleport stone a menu pops up whith the question: to which floor do you wanna go? if i select an option the player wil be "teleported" to coordinates for example:

player.PositionCell 1920, 1423, -616, 45, "floor"

what i need is the script for the message window poping up and giving the options. i will take care of the coordinates

Link to comment
Share on other sites

Basically, you need to use message boxes with getbuttonpressed.

http://cs.elderscrolls.com/constwiki/index.php/MessageBox

http://cs.elderscrolls.com/constwiki/index...etButtonPressed

The hard part is rigging it in a way that what was chosen only happens once, by understanding what blocktypes each element need to be run in, and how to use variables and conditions to control what parts of a script are run when. The first script example for getbuttopressed could probably be modified to work in this case. Just be sure that you initiate the teleport as the final thing within that "if" statement since teleporting the player acts as a return, and will prevent any coding from being done afterward. For instance, the difference between;

player.movetomarker <marker>
set buttonpressed to 0

and

set buttonpressed to 0
player.movetomarker <marker>

is that in the first case the player will be moved before the script has a chance to reset, making the player keep teleporting to that chosen location every time they get within loading range of the activator. In the second case, the reset is done before the teleport, so that there isn't any unwanted repeat.

Link to comment
Share on other sites

Begin OnActivate
   if IsActionRef player == 1
		  messagebox "teleport to?", "level 1", "level 2", "level 3"
		  set buttonPressed to 1
		  set button to -1
   endif
end

begin gamemode
   if buttonPressed == 1
			set button to getbuttonpressed
   endif

if button > -1
	if button == 0
	  set buttonPressed to 0
			  player.PositionCell 1920, 1423, -616, 45, "floor1"
	elseif button == 1
	  set buttonPressed to 0
			  player.PositionCell 1920, 1423, -616, 45, "floor2"
	elseif button == 2
	  set buttonPressed to 0
			  player.PositionCell 1920, 1423, -616, 45, "floor3"
	endif
endif
end

so this should work? on this page they say to add a lor of stuff for reasons i dont understand

Link to comment
Share on other sites

Well, you should probably use markers and movetomarker instead of positioncell. Positioncell is really more for the movement of statics and activators within the same cell as the calling object, not actors being moved to other cells, and can have unwanted issues depending on how the cells are setup. Using markers is also a more flexible process and can be adjusted easier should you need to make changes.

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...