Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Mouseover2

Solution ;Mouseover sript #2
;Create a horizontally shaped door comprised of some number of equally wide segments.
;When the mouse is 'clicked' over different portions of this door
;it will change the door picture of a second door.
ON SELECT
{
targetdoor GLOBAL
;************************************************************************
;Define the shape of the door, how many equi-shaped sections there are,
;and what door to change the picture of.
240 x_left =
495 x_right =
225 y_up =
255 y_down =
4 sections =
;************************************************************************
{ MOUSEPOS POP x =
x_right x_left - sections / width =
x x_left - width / 1 + mouseover =
mouseover targetdoor SETSPOTSTATELOCAL
} MOUSEPOS DUP y_up >= SWAP y_down <= AND
SWAP DUP x_left >= SWAP x_right <= AND AND IF
}



;Create a second door in which you want to change door pictures.
ON ENTER
{
targetdoor GLOBAL
ME targetdoor =
}
 
Was this article helpful? yes / no
Article details
Article ID: 59
Category: Room Scripts
Date added: 04-02-2011 15:42:38
Views: 442
Rating (Votes): Article not rated yet (0)

 
<< Go back

Powered by Help Desk Software HESK™