 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
J_Taylor The Self-Proclaimed King of Ketchup

Joined: 02 Dec 2009 Posts: 188 Location: Western NY
|
Posted: Wed Mar 02, 2011 1:47 pm Post subject: Mouse? Again? |
|
|
Hey, so I need help with getting a mouse cursor in-game with the latest nightly. All of a sudden, the old script I was using isn't working, and I can't figure out a new one...
Help? _________________ Elemental: .75%
Heart of Darkness: 0% (crash)
The Mansion: .05%
Shattered Alliance: .05%
See a pattern forming? I do, dammit. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Mar 02, 2011 9:59 pm Post subject: |
|
|
Can you post the complete scripts? What you described on SS sounds correct, but I want to double check.
Bagne reported a bizarre impossible map slice layering problem, which IIRC I was able to reproduce but couldn't figure out before I was distracted, so it might be an engine bug. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
J_Taylor The Self-Proclaimed King of Ketchup

Joined: 02 Dec 2009 Posts: 188 Location: Western NY
|
Posted: Thu Mar 03, 2011 6:29 am Post subject: |
|
|
This was the result of me trying to isolate the problem:
Code: | include, plotscr.hsd
include, Alliance.hsi
define constant (0, timer:mouse)
global variable (1, mouse cursor)
plotscript, new-game, begin
menu1
end
script, menu1, begin
init mouse
mouse region (-1, -1, -1, -1)
mouse cursor := load walkabout sprite (0)
end
script, menu1 buttons, begin
set slice x (mouse cursor, mouse pixel x)
set slice y (mouse cursor, mouse pixel y)
slice to front (mouse cursor)
set timer (timer:mouse, 0, 1, @menu1 Buttons)
end |
_________________ Elemental: .75%
Heart of Darkness: 0% (crash)
The Mansion: .05%
Shattered Alliance: .05%
See a pattern forming? I do, dammit. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Mar 05, 2011 3:04 am Post subject: |
|
|
So I take it that you never actually call "menu1 buttons" anywhere, or start the timer. Scripts containing "set timer" calls don't magically start themselves. Try the following:
Code: | script, menu1, begin
init mouse
mouse region (-1, -1, -1, -1)
mouse cursor := load walkabout sprite (0)
menu1 buttons
end |
(Also, "mouse region (-1, -1, -1, -1)" is no longer needed if you are using a recent nightly) _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
J_Taylor The Self-Proclaimed King of Ketchup

Joined: 02 Dec 2009 Posts: 188 Location: Western NY
|
Posted: Tue Mar 08, 2011 6:42 am Post subject: |
|
|
Oh. D'oh. My thinking was that I was going to check to get JUST the mouse working, THEN the buttons. Whoops. I'll see if fixing that works. _________________ Elemental: .75%
Heart of Darkness: 0% (crash)
The Mansion: .05%
Shattered Alliance: .05%
See a pattern forming? I do, dammit. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|