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 / New Inventory Script Help...

Author
Message
Slayer1918z
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location:
Posted: 27th Feb 2011 15:09
Ok, well so far I have been working on an inventory script that has five categories (weapons, items, potions, and spells). When the player presses "T" the inventory opens on weapons and if the player presses "T" again it goes to the next category. But, I have two problems.
1 - The cursor does not move at all so I can't click on anything in the inventory.
2 - When I pickup the sword (Steel Longsword), the icon for it does not display in the inventory under the weapons category or anywhere else.

Here is the main inventory script (put into a trigger zone)


And here is the sword script (placed as the main script in the sword)


Any help would be great because I have been stuck on this for a while and found no solution.
Slayer1918z
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location:
Posted: 2nd Mar 2011 22:32
Sorry for asking again, but as it has been a few days and my thread is slowly slipping away, I still do need help, plz.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 2nd Mar 2011 23:02
I'm not sure why your sword HUD isn't appearing, but in order to show the cursor I believe you have to use "pausegame".

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Slayer1918z
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location:
Posted: 2nd Mar 2011 23:48
I placed the "pausegame" action right after "hudshow=pointer" in state=1 but my game just froze.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 3rd Mar 2011 09:31
Looking through your script you don't seem to actually create a pointer HUD. This may be the reason the cursor doesn't appear.

The action "pausegame" is supposed to freeze the game. You'll need to use "resumegame" when you exit your inventory to un freeze it.

I have been experimenting with this and although I get my pointer to appear - i can't get the script to acknowldge mouse clicks- which is a bit frustrating. If i make any progress I'll let you know. Conversely - if you make any progress please let me know.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Slayer1918z
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location:
Posted: 3rd Mar 2011 12:53
Well, in state=1 I have "hudshow=pointer" and that creates a pointer. I just can't get the pointer to follow my mouse.
And, with "pausegame" my game would freeze even before I could see the inventory.
Anyways, I'll keep experimenting with this...
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 3rd Mar 2011 14:04 Edited at: 3rd Mar 2011 14:05
Ah. that's your problem then.
"hudshow=pointer" does not display the mouse cursor - unless you created a pointer HUD called pointer.
What you need to do is define the pointer, just like your other HUDs:

you'll need to either create POINTER.png you use a pre-existing pointer image, but you get the idea.

Even with the game frozen/paused you should still see you inventory.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Slayer1918z
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location:
Posted: 3rd Mar 2011 22:47
Ok, I've changed the script to define the pointer and have placed a pointer image in the folder and changed the way the script identifies whether or not the player has the longsword but the pointer doesn't appear at all anymore and the sword HUD still doesn't appear.
Here is the script...
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 4th Mar 2011 09:22
Hi,
I'm really comment on Ply's commands as I don't use Ply's Mod.

One thing i can say is that you do noty need to define "hudx=" and "hudy=" for pointers, so you can remove these actions (although I don't believe this is where the problem is).

Maybe I missed it, but i couldn't see an "etimerstart" before the ":state=1,etimergreater=" line.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Slayer1918z
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location:
Posted: 4th Mar 2011 20:57
Well, I use PB, but either way that doesn't matter. I have now taken out the hudx= and hudy= for the pointer, but it still doesn't work, and added etimerstart before state=1 although I'm not sure how that was the problem because my inventory always opened, just the pointer and other HUDs didn't work.
Slayer1918z
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location:
Posted: 11th Mar 2011 22:05
Sorry, but I'm still having a lot of trouble with this script. Can anyone else help?

Login to post a reply

Server time is: 2024-11-24 11:06:13
Your offset time is: 2024-11-24 11:06:13