Hello all
Once again I am having trouble with Wiremod. I've come across something else I just can't seem to figure out how to do?
This time I would like to input a number. I am working with coordinates in this project, namely teleporting an entity. Anyway I need to be able to set the coordinates. all I can do at the moment is set Adv. inputs to increase and decrease, and this isn't very precise when it goes at the speed it does. I am looking for a way where I can type a number into something, and have it set that number as the x coordinate. then the same for Y and Z coordinates. Any help?
Thankyou for your time
rather than post this again, Shameless self bump
[code]@outputs Vec:vector X Y Z
if (first()) {runOnChat(1)}
elseif (chatClk(owner())) {
M = lastSaid():explode(" ")
if (M[1,string] == "!set") {
hideChat(1)
Temp = M[2,string]:explode(",")
X = Temp[1,string]:toNumber()
Y = Temp[2,string]:toNumber()
Z = Temp[3,string]:toNumber()
Vec = vec(X,Y,Z)
print("Vec set to:",Vec)
} elseif (M[1,string] == "!get") {
hideChat(1)
print("Vec is currently:",Vec)
}
}[/code]
Usage:
[quote]Command:
!set 1,2,3
Message:
'Vec set to: [1,2,3]'[/quote]
[quote]Command:
!get
Message:
'Vec is currently: [1,2,3]'[/quote]
What can I say Divran, another fantastic, flawless piece of work. Thankyou so much, I've been puzzling over this for weeks!
Sorry, you need to Log In to post a reply to this thread.