Official Forum
You are not logged in.
Ive started seeing some scenes that use mouse control (the scripting- it seems to be really helpful if you know how to use it) and I was wondering if there was a way to aim something, like a gun, where the mouse is pointing. Is this possible? If so, then how would I do something like this? It would also be helpful to know how to spawn objects in the simulation, however Im sure something like that would be somewhere around here to find out.
Any ideas how this would work? Im not very experienced with thyme.
Offline
Me neither. Good idea, though. Your best bet is an answer from grady.
Offline
App.GUI.mousePos
Already on it.
Offline
App.mousePos
Is the correct code ![]()
I don't remember if you can, but I think you can bind a key to do something on mouse click (meaning you could create a button to create liquid or something
), but I don't remember (I think you can bind scrolling, so....)
Offline
gradfitz wrote:
Code:
App.mousePosIs the correct code
I don't remember if you can, but I think you can bind a key to do something on mouse click (meaning you could create a button to create liquid or something), but I don't remember (I think you can bind scrolling, so....)
Well, whatever it is, I couldn't find the key (well, it is a mouse click, not a key anyway).
Offline
I've been thinking about how to make a shape point at the mouse. I bet I could do it if it's possible to assign a pointer value to the angle of a shape. Like how you can assign stuff in a shapes script menu (except angle and position aren't in the menu). I bet it's doable but I'm not sure how.
Offline
You know, you would have to do some math there, like finding the angle between two points.
Offline
how do you use scripts in phun anyway? i was kind of wondering...i used to do a lot of game maker stuff and wrote some simple programs
Offline
ioncann0ns can you just put a link for the tutorial script?
Offline
I've check the entire tutorial section and there's no tutorial being created by Grady.
Last edited by Blitzgrutel (2009-03-26 09:10:58)
Offline
http://www.phunland.com/forum/viewtopic.php?id=6392
http://www.phunland.com/forum/viewtopic … 30&p=1
It was moved to the Phun scripting section, since it is about thyme.

Offline
RicH wrote:
http://www.phunland.com/forum/viewtopic.php?id=6392
http://www.phunland.com/forum/viewtopic … 30&p=1
It was moved to the Phun scripting section, since it is about thyme.
i still couldn't find it ![]()
Offline
do u mean like an fps?? i have an idea if it is. i probably couldnt make this but. Have like 4 really big pistons that somehow move in sync with ur mouse. (kinda like those Gps deals you see on mythbusters and prototypes this.) and those pistons push the 'gun in sync with ur mouse

Offline