Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / [Proof of Concept] Fully working in-game mouse pointer in FPSC

Author
Message
The Zombie Killer
9
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 25th Jan 2013 14:17
Hi all,
Just a little (actually, relatively large) script I whipped up that lets you use a fully working mouse in-game. It should work with any version of FPSC that supports variables and GUI-X9 (I believe that means v1.18 and up should be fine).

Here it is, in all its 228 line glory:


If you're wondering why the script is so huge, it's because GUI-X9's SetHUDX and SetHUDY commands don't seem to support variables.

Anyway, enjoy!

-TZK

s4real
Valued Member
14
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 25th Jan 2013 15:06
I have no idea why you adding all that when all you need to do is :-

:startmenu,hudshow=pointer

Wish you all the best in this project.

best s4real

Pack ya games with vishnu packer its free. Vishnu game launcher is now released.
Help keep vishnu free by pledging now :- http://vishnu.chipin.com/vishnu
The Zombie Killer
9
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 25th Jan 2013 15:15
@s4real
Well, I feel really stupid now.

-TZK

Flatlander
FPSC Tool Maker
13
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Jan 2013 00:33
I now see why you wanted to disable the actual mouse look so that the mouse cursor moves but not the player looking around.

So, there is a difference between the two. The latter has a stationary mouse cursor and the prior actually moves the cursor with the mouse. That is an achievement whether you feel stupid or not. Very good coding on your part, I must say.

I looked at disabling mouse look at one time and it seems to me I was having difficulty figure out the easiest way to do it. As someone said regarding Karate, "The best defense is not to be there." If you don't want something to work or to be disabled, then don't execute the code.

THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why. For me, theory and practice are combined: nothing works and I don't know why.
rolfy
14
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 26th Jan 2013 00:47
I reckon just about everything I do has an easier alternative, but the fun is in finding a way to make it work at all.

Best, rolfy.

I don't trip over...I do random gravity checks.
BlackFox
FPSC Master
12
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 26th Jan 2013 01:05
Nice work, TZK. Don't feel stupid at all- some of use thrive on making "complicated" scripts. I have a similar method but do not rely on the GUI-X9 "stuff" since I use v1.17 and it is not there (a plus for me). I did make a few commands to achieve the same method, so good to see others doing the same thing.

Quote: "I reckon just about everything I do has an easier alternative, but the fun is in finding a way to make it work at all."


I hear you there. We were told once "you will never get water into v1.17" and poof- we have it. We were told we would never get much done with our version being old, and yet I do not suffer near the amount of issues others do and our work has turned out great. I don't believe in easier alternatives- I go straight for complicated. It's a Fox's nature- the thrill of the challenge.


There's no problem that can't be solved without applying a little scripting.
The Zombie Killer
9
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 26th Jan 2013 08:46
Quote: "So, there is a difference between the two. The latter has a stationary mouse cursor and the prior actually moves the cursor with the mouse. That is an achievement whether you feel stupid or not. Very good coding on your part, I must say."

So, the way s4real mentioned is just a stationary image?

Quote: "Nice work, TZK. Don't feel stupid at all- some of use thrive on making "complicated" scripts. I have a similar method but do not rely on the GUI-X9 "stuff" since I use v1.17 and it is not there (a plus for me). I did make a few commands to achieve the same method, so good to see others doing the same thing."

Yeah, I prefer the complicated ways too, the only reason I prefer to have simplified and shortened versions is because of the script line cap. If only FPSC just searched for the final line of the script instead of a static number.

Quote: "I reckon just about everything I do has an easier alternative, but the fun is in finding a way to make it work at all."

Couldn't have said it better myself.

-TZK

s4real
Valued Member
14
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 26th Jan 2013 13:55
@The Zombie Killer :- No don't think you stupid as its a good knowledge of scripting the way you done it but the problem is if you making a inventory you going to run out of script lines as a script can only have a maximum of about 300 lines not sure whithout looking at the source.

Yes you can link scripts together.

The method I said should make the mouse move around the screen and not be static plus you must put stopmenu when u exit the inventory.

blackfox is the person to talk too about inventory as he made some good ones for his games.

best s4real

Pack ya games with vishnu packer its free. Vishnu game launcher is now released.
Help keep vishnu free by pledging now :- http://vishnu.chipin.com/vishnu
Flatlander
FPSC Tool Maker
13
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Jan 2013 17:37
Quote: "The method I said should make the mouse move around the screen and not be static "


I tried it and the mouse is static remaining in the middle of the screen. I rarely say anything unless I've tried it myself.

THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why. For me, theory and practice are combined: nothing works and I don't know why.
s4real
Valued Member
14
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 26th Jan 2013 19:26
Quote: "I tried it and the mouse is static remaining in the middle of the screen. I rarely say anything unless I've tried it myself."


Well it won't move until the rest of the inventory code is there and variables, I was just saying to save a lot of code he only needs that one line.

To get a better idea check out this thread :- http://forum.thegamecreators.com/?m=forum_view&t=158412&b=23



best s4real

Pack ya games with vishnu packer its free. Vishnu game launcher is now released.
Help keep vishnu free by pledging now :- http://vishnu.chipin.com/vishnu
BlackFox
FPSC Master
12
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 26th Jan 2013 19:50 Edited at: 26th Jan 2013 19:55
Here is our newest addition to our Egyptian game Ancient Tombs 1- the inventory (WIP). As you can see, items are click-able via the mouse. It uses the variable system, but nothing else (including GUI X9 since it is not in our source). I like the fact we can have the items displayed and requiring mouse clicks rather than needing text to specify a letter like we did in the past. Makes the inventory cleaner and less cluttered.



So off the start you noticed how all items were locked. Once the artifact was collected, the inventory icon changed to an artifact. The player can click the unlocked item icon and a hud opens up. Although nothing was in that hud, that will tell the player how many of that item they have in inventory, use it, trade it, sell it, drop it, etc.

The bonus to our inventory system is that I can use in v1.18+ (v1.17 of our source only). And it is controlled by the mouse buttons- no keyboard keys.


There's no problem that can't be solved without applying a little scripting.
Flatlander
FPSC Tool Maker
13
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Jan 2013 20:47
Quote: "Well it won't move until the rest of the inventory code is there and variables, I was just saying to save a lot of code he only needs that one line."


Ahhh, it needs more code than just the one line which is all I used to test it out. I was kinda thinking along those lines this morning after a good night sleep.

THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why. For me, theory and practice are combined: nothing works and I don't know why.

Login to post a reply

Server time is: 2020-10-28 11:42:05
Your offset time is: 2020-10-28 11:42:05