Lost with Python
Re: Lost with Python
Well my clickable and my bound are both set as actors. Is there anything else? Like logic properties in the logic panel?
Fighting, Horrible disposition to others based on beliefs... What's the point anymore? Was there ever a point? Dead is what it is and always will be until peace is achieved through everyone.
- andylegate
- Posts: 2348
- Joined: Mon Oct 01, 2007 7:47 am
- MOULa KI#: 0
Re: Lost with Python
Make sure that you have bounds set for your clickable object too. I'd make your click region a bit bigger, it looks like it just barely can contain the avie.
Check for mispellings in your ALCscript.
You have a sound emitter, that's good. I would add some flags to it in your script, like making it a 3D sound.
Make sure that if you change after you change the size and position of both the click region and the object that is the clickable, you give them a new center, and you use Cntl-A. I've had clickables not work because of that.
When asking us for help, make sure you tell us the following:
Is your cursor turning "hot" when you move your mouse over the object?
Check for mispellings in your ALCscript.
You have a sound emitter, that's good. I would add some flags to it in your script, like making it a 3D sound.
Make sure that if you change after you change the size and position of both the click region and the object that is the clickable, you give them a new center, and you use Cntl-A. I've had clickables not work because of that.
When asking us for help, make sure you tell us the following:
Is your cursor turning "hot" when you move your mouse over the object?
"I'm still trying to find the plKey for Crud!"

Blender Age Creation Tutorials
3DS Max Age Creation Tutorials

Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
Re: Lost with Python
I made the bound larger, reset the centerpoints and double checked my AlcScript and it still doesn't work. What I mean by not clickable is there is no hotspot on the button. There is bounds set to the clickable object and it is an actor, same for the clickable region. I made my sound emitter a 3D one but I can't hear it until the button works.
Fighting, Horrible disposition to others based on beliefs... What's the point anymore? Was there ever a point? Dead is what it is and always will be until peace is achieved through everyone.
Re: Lost with Python
It is not your fault. I checked the quickscript and it is set up in a way that makes the pythonfile required. We seem to have forgotten that this quickscript was originally made for calling Python files.
There is another way to make this work though. You have to write out the full logic script like this:
There is another way to make this work though. You have to write out the full logic script like this:
Code: Select all
Button_Decals:
physical:
pinned: true
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Decal_Rgn_click
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
- type: facing
satisfied: true
directional: true
actions:
- type: responder
ref: $SoundResp
actions:
- type: responder
tag: SoundResp
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:sound_emit_decals
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
"It is in self-limitation that a master first shows himself." - Goethe
- andylegate
- Posts: 2348
- Joined: Mon Oct 01, 2007 7:47 am
- MOULa KI#: 0
Re: Lost with Python
Ah! This explains why my stuff is working okay. I had remembered that you (D'Lanor) had simplified this and told me about it, but by the time I was ready to do other clickables, I couldn't find it right away, so I just copied and pasted that long logic version we first came up with!!!....I assumed that the new one was a done deal.
"I'm still trying to find the plKey for Crud!"

Blender Age Creation Tutorials
3DS Max Age Creation Tutorials

Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
Re: Lost with Python
The sound I added to the quickscript is a done deal, but the whole thing only works if there is a pythonfile. If no pythonfile is given it just quits. I did not change anything in the original way this was set up.
"It is in self-limitation that a master first shows himself." - Goethe
Re: Lost with Python
Thanks a bunch D'Lanor!
My buttons work perfectly! My training age is back on track! WOOT!






Fighting, Horrible disposition to others based on beliefs... What's the point anymore? Was there ever a point? Dead is what it is and always will be until peace is achieved through everyone.
-
- Posts: 1057
- Joined: Fri Sep 28, 2007 8:01 pm
- MOULa KI#: 23247
- Location: US (Eastern Time)
- Contact:
Re: Lost with Python
This has come up every time someone has tried to use the simpleclick quickscript, and almost every time it has resulted in them setting up the full logic mod manually. Is this not a good indicator that the quickscript should be set up to not require a python file?
(The real question: is anyone actually using the quickscript in it's current form that would object to it's being changed?)

- boblishman
- Posts: 882
- Joined: Fri Oct 05, 2007 4:47 pm
- MOULa KI#: 0
- Location: Spain
Re: Lost with Python
D'Lanor wrote:There is another way to make this work though. You have to write out the full logic script like this:Code: Select all
Button_Decals:
physical:
pinned: true
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: Decal_Rgn_click
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
- type: facing
satisfied: true
directional: true
actions:
- type: responder
ref: $SoundResp
actions:
- type: responder
tag: SoundResp
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:sound_emit_decals
cmds:
- play
- setvolume
volume: 1
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
A quick question D'Lanor ... is there a way to add an animation to this Alcscript - so that it doesn't need a python file ... ?
(My idea is to have a button to click, the avatar presses it, it makes a sound like it's not working (just a click noise) ... but doesn't actually make anything move
(i.e. - it's "broken" - or has no "power" - at the moment

when it comes to Age creation ... "DOH" seems to be my middle name...
Re: Lost with Python
Nadnerb wrote:This has come up every time someone has tried to use the simpleclick quickscript, and almost every time it has resulted in them setting up the full logic mod manually. Is this not a good indicator that the quickscript should be set up to not require a python file?(The real question: is anyone actually using the quickscript in it's current form that would object to it's being changed?)
Yes, I am using the quickscript in its current form. Not that I personally would mind writing out the full logic script but if this is going to change it should remain compatible with people's current alcscripts. Too many things have already been broken in the past by updates.
It would be good to make all parameters optional and independent.
Also the oneshotmod should be set up so that you can choose to either feed it through Python or run it directly (although I would still recommend the Python method for multiplayer compatibility).
A quick question D'Lanor ... is there a way to add an animation to this Alcscript - so that it doesn't need a python file ... ?
Yes. I will show you when I get home from work if someone does not beat me to it.
Edit: Here you go.
Code: Select all
<clickable>:
logic:
modifiers:
- tag: AutoClick
cursor: poised
flags:
- localelement
activators:
- type: objectinvolume
remote: <region>
triggers:
- any
conditions:
- type: activator
activators:
- type: picking
- type: objectinbox
satisfied: true
- type: facing
satisfied: true
directional: true
actions:
- type: responder
ref: $SoundResp
- type: oneshot
ref: $ClickAnim
actions:
- type: oneshot
tag: ClickAnim
oneshot:
animation: <animation name>
seektime: <time in seconds>
remote: <animation target>
- type: responder
tag: SoundResp
responder:
states:
- cmds:
- type: soundmsg
params:
receivers:
- 0011:<soundemitter>
cmds:
- play
- setvolume
volume: <sound volume>
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
"It is in self-limitation that a master first shows himself." - Goethe