Button Alcscript problem

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Button Alcscript problem

Postby boblishman » Mon Sep 01, 2008 8:26 am

Ok guys... I really need your help... this is driving me insane ... I have spent about 6 hours on this already but to no avail ... :(

(I have previously made a (quite complex) animated "button", with synchronised sound and avatar animation, that opens a "door" ... and it works perfectly, so it's not like this is my first attempt.)

All I want to do now, is to make a simple "button" that animates and plays a sound without any avatar animation ... so ... I made the button (called button1), added the IPO animation and set it to loop and autostart ... checked it in game ... Works perfectly.

Then I added a generic logic region (called KeyPadRgn) to surround the button (to make it clickable), and added a sound emitter (called emit_but1snd) for the sound.

I then set about using "sections" of my previous Alcscript (and obviously changed the animation to not autostart or loop and changed the names of the various objects) ...

Now, I thought I had got my head around the Alcscript for animations ... but obviously not, ... :evil: ...

This SIMPLE button just refuses to animate or play the sound !

Sure, I get the hotspot ... but no "action" ... grrrrr ...



Now, can anyone spot where I am going wrong with the alcscript ...

buttonscript.jpg
buttonscript.jpg (41.57 KiB) Viewed 2047 times



Your help would be VERY much appreciated as I have 8 more of these simple buttons to create.

Once I can get one working ... then I´ll be ok ... ;)

Cheers
Last edited by boblishman on Mon Sep 01, 2008 12:59 pm, edited 1 time in total.
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Button Alcscript problem

Postby D'Lanor » Mon Sep 01, 2008 9:28 am

You used the $ character to reference a name. Names should be referenced with a : character. The $ character is reserved for tag references.

Referencing a name:
Code: Select all
actions:
  - type: responder
    ref: :butresp


As a note of interest, tag references only work within the same object which is the case here. So alternatively you could keep the $ and change "name: butresp" to "tag: butresp".
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Button Alcscript problem

Postby GPNMilano » Mon Sep 01, 2008 9:42 am

What D'Lanor said. Your script is making two responders upon export. A named one, and an autoclick referenced one.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Button Alcscript problem

Postby boblishman » Mon Sep 01, 2008 11:24 am

AAAAAAAAAAAAARRRRRRRRRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHH !
6 hours of sweat and tears .... all for one single stupid $ character ... :twisted:

Thanks D'Lanor ... works perfectly ... now I can get the other 8 working ... :)

EDIT: All 9 buttons are now working ... Thanks again! :)
when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain


Return to Building

Who is online

Users browsing this forum: No registered users and 3 guests

cron