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

Init Mouse
Goto page 1, 2  Next
 
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: Thu Apr 22, 2010 3:16 pm    Post subject: Init Mouse Reply with quote

Okay, so I got an AWESOME game idea in my kinda-awake, kinda-asleep state this morning. Only catch is, it'll have to be mostly plotscripting. And the player moves around with a mouse.

Here's the catch. I tried to integrate the init mouse command piece in the plotscripting dictionary, but I got a 'press scroll lock to free mouse' message written across the top of the game (in the area that gives the game path). I couldn't even get past the intro screen. Every time I hit scroll lock, it would activate, but go right back to the title screen. I couldn't even glimpse my map!

So, I tried copying the short script provided directly into a new script file. I actually got into the map, but the mouse wasn't moving the NPC mouse sprite. Is there a glitch in that code? Is it my PC? Is it something else? I'm lost.

Any help would be REALLY appreciated. I don't expect to get this game done for a LONG time, but I really, really, really want to make it, and trying to get around using a mouse would be a real headache.
_________________
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
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Apr 22, 2010 3:34 pm    Post subject: Reply with quote

If you want to disable the mouse locking (which I think was a bad idea to make default) use:

Code:

init mouse
mouse region (-1, -1, -1, -1)


As for the rest of your question, I would probably have to see the script (and maybe the game file too) to give you an answer as to why it is not working.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ravenshade




Joined: 03 Apr 2010
Posts: 50

PostPosted: Fri Apr 23, 2010 1:47 pm    Post subject: Reply with quote

James Paige wrote:
If you want to disable the mouse locking (which I think was a bad idea to make default) use:

Code:

init mouse
mouse region (-1, -1, -1, -1)


As for the rest of your question, I would probably have to see the script (and maybe the game file too) to give you an answer as to why it is not working.


make non-default in the next release? (seems like a simple task)
_________________
Campaigning to change the name of OHRRPGCE to Orph anage, because it's just better and easier to pronounce!

Campaigning for Linux! Down with Win.exe!

PS. It's mean to replace words just because you don't like them ¬_¬ moderators...
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Apr 23, 2010 2:05 pm    Post subject: Reply with quote

Ravenshade wrote:
make non-default in the next release? (seems like a simple task)


I avoid just changing defaults like that because of the potential to break existing games. (although so few OHR games use the mosue, there aren't like to be any that strictly rely on mouse lock)

But the real "right thing to do" would be to make the default mouse grab state a configurable option in the General Game Data menu.

I am planning to add mouse support for non-scripted games in the near future: Plan for improved mouse support
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ravenshade




Joined: 03 Apr 2010
Posts: 50

PostPosted: Fri Apr 23, 2010 2:15 pm    Post subject: Reply with quote

...I should think about these things before suggesting them... guess that's why your the developer Oookay...
_________________
Campaigning to change the name of OHRRPGCE to Orph anage, because it's just better and easier to pronounce!

Campaigning for Linux! Down with Win.exe!

PS. It's mean to replace words just because you don't like them ¬_¬ moderators...
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Apr 23, 2010 2:26 pm    Post subject: Reply with quote

There is nothing wrong with suggesting things :)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
J_Taylor
The Self-Proclaimed King of Ketchup




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

PostPosted: Tue Apr 27, 2010 5:07 am    Post subject: Reply with quote

I'll gave that a try. As for the rest of the script, it's nonexistent. I wanted to get the mouse up and running before I worked on anything else, cuz the game is totally mouse-controlled. Maybe I'll add secondary keyboard controls, too. That's a thought I hadn't considered. Anyways...

Is it a bad approach to work on the mouse first? Should I be focusing on something else first? Since I haven't actually COMPLETED any games yet, I figured I should look for advice.
_________________
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
J_Taylor
The Self-Proclaimed King of Ketchup




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

PostPosted: Thu Apr 29, 2010 3:28 pm    Post subject: Reply with quote

Huh?

Okay. I think I'm gonna need an 8-year-old explanation on how to get a mouse in-game. Something I'm doing with my script ain't making the mouse work. Could somebody post a functional script to initialize a mouse attached to an NPC that can move across the entire screen?
_________________
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
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Apr 29, 2010 8:05 pm    Post subject: Reply with quote

Code:

include, plotscr.hsd

global variable(1, mouse cursor)

define constant(15, timer:mouse)

plotscript, mouse tester, begin
  init mouse
  mouse region(-1, -1, -1, -1)
  mouse cursor := load walkabout sprite(1)
  mouse update loop
end

script, mouse update loop, begin
  set slice x(mouse cursor, mouse pixel x)
  set slice y(mouse cursor, mouse pixel y)
  set timer(timer:mouse, 0, 1, @mouse update loop)
end


Here is what I believe to be the simplest possible mouse script. It loads walkabout sprite #1 as a mouse cursor, and keeps it updated using a timer.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
J_Taylor
The Self-Proclaimed King of Ketchup




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

PostPosted: Tue May 04, 2010 4:17 am    Post subject: Reply with quote

Thanks!
_________________
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
J_Taylor
The Self-Proclaimed King of Ketchup




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

PostPosted: Tue May 25, 2010 3:58 am    Post subject: Reply with quote

Wow. I am having so much trouble with this stuff...

So thanks to the super-obvious script that initializes the mouse, I now have one in game. However, I have been spending the last two weeks trying to figure out how to accurately script a mouse-related piece, to no avail.

I want a button. The player clicks on the button, it turns on a tag, and the tag changes the slice visual to a darker button.

Something here is not working. Any 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
J_Taylor
The Self-Proclaimed King of Ketchup




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

PostPosted: Tue Jun 08, 2010 3:34 am    Post subject: Reply with quote

Um... over here? Help? Please?
_________________
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: Tue Jun 08, 2010 7:00 am    Post subject: Reply with quote

Sorry, I've been doing little aside from assignments and sleeping for the past week. I've been meaning to get back to these mouse questions for a while, but it's 3am right now, and I've got to write a report.

So I'll just write a quick reply:

James Paige wrote:
Ravenshade wrote:
make non-default in the next release? (seems like a simple task)


I avoid just changing defaults like that because of the potential to break existing games. (although so few OHR games use the mosue, there aren't like to be any that strictly rely on mouse lock)

But the real "right thing to do" would be to make the default mouse grab state a configurable option in the General Game Data menu.


Actually, I agree that making mouse lock default was a bad idea, and agree with Ravenshade. The mouse lock stuff was really rushed before the last release, based on the misguided assumption that most people using the mouse would want to use it to scroll the screen, and was largely motivated by attempting to smooth over mouse handling differences in gfx_directx. I've decided to just write an alternative mouse input in gfx_directx.

I've never actually seen anyone but me use the mouse to scroll the screen (and that was years ago); I think we can easily change the default, maybe add a general game data option, and also even an option in the Game configuration menu, whenever that is finally implemented. mouseregion could still be used to turn on locking via script.
_________________
"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 Jun 08, 2010 10:24 am    Post subject: Reply with quote

I appreciate the attempt, but I really didn't understand any of that.

Am I trying to approach this wrong?

I have the mouse attached to a slice, and a slice 40 pixels wide at the edge of the screen. I'm trying to have the script check to see if the 40 pixel wide slice contains the mouse slice, and if so, change the mouse slice to a different visual.

Good luck on your report.
_________________
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
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Tue Jun 08, 2010 1:12 pm    Post subject: Reply with quote

Can you post some of your code?

I think the "slice collide" command will help you, but seeing your script so far might help make it easier to explain how to use it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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