Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Mouseover 1

Solution ;Mouseover script #1
;This script changes the state of multiple spots when the mouse is over specified locations in a room.
;Create multiple spots. Place this script in one of them.
;In each spot leave the first picture as <none>. Put the 'mouseover' picture as the second picture.
ON ENTER
{
0 ME SETALARM
}

ON ALARM
{
[
;
;************************************************************************
;Put spot coordinates here in form:
;[ x_left x_right y_up y_down spotID ]
;
[ 100 150 100 120 1 ]
[ 100 150 120 140 2 ]
[ 100 150 140 160 3 ]
[ 100 150 160 180 4 ]
[ 100 150 180 200 5 ]
;************************************************************************
] moarray =
{ temparray =
MOUSEPOS DUP temparray 2 GET >= SWAP temparray 3 GET <= AND
SWAP DUP temparray 0 GET >= SWAP temparray 1 GET <= AND AND mouseover =
{ mouseover temparray 4 GET SETSPOTSTATELOCAL } temparray 4 GET GETSPOTSTATE mouseover == NOT IF
i ++
} moarray FOREACH
30 ME SETALARM
}
 
Was this article helpful? yes / no
Article details
Article ID: 56
Category: Room Scripts
Date added: 04-02-2011 15:41:08
Views: 602
Rating (Votes): Article rated 3.0/5.0 (2)

 
<< Go back

Powered by Help Desk Software HESK™