Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Mouse? Again?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
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

PostPosted: Wed Mar 02, 2011 1:47 pm    Post subject: Mouse? Again? Reply with quote

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... Sad...

Help?
_________________
Elemental: .75%
Heart of Darkness: 0% (crash)
The Mansion: .05%
Shattered Alliance: .05%

See a pattern forming? I do, dammit.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Mar 02, 2011 9:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
J_Taylor
The Self-Proclaimed King of Ketchup




Joined: 02 Dec 2009
Posts: 188
Location: Western NY

PostPosted: Thu Mar 03, 2011 6:29 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Mar 05, 2011 3:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
J_Taylor
The Self-Proclaimed King of Ketchup




Joined: 02 Dec 2009
Posts: 188
Location: Western NY

PostPosted: Tue Mar 08, 2011 6:42 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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