Scripts / Hide Sprite...

Author
Message
Mariokiki
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 4th Feb 2016 17:32
Hi,

Using the sprite system, I would like to display the icons representing the objects that the player has in his possession.

To test them, I create the different sprites from the differents pictures and I positioned them next to each other.

So far, so good !

But after I'm stuck !! How to show or hide a sprite on the screen ?

I have not found the "Hide Sprite" command...

Thanks for help
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 4th Feb 2016 17:56 Edited at: 4th Feb 2016 17:59
Set it up like the scriptbank/Radar stuff for a start.

[video=youtube]https://www.youtube.com/channel/UC1q1e3Q9IKMk4nDlAGb_5Jg[/video]
that was the tutorial. and there is also a twitch broadcast for those. Broadcast 25 to explain what and why he is doing the things he is.

More info and scripts for objects on this thread:
https://forum.game-guru.com/thread/207801?page=11#msg2535090
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th Feb 2016 18:18
if you aren't going to be using that sprite again use DeleteSprite()
but more likely you will be as it's an inventory so as myke said, follow the radar example and use SetSpritePosition()
it's % based of the screen so 200,200 is way off the screen.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Mariokiki
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 4th Feb 2016 22:45
Thanks guys !

I found the same tips in the "KillerQuest" script :

if mouseOn == 1 then
SetSpritePosition ( pointerSprite , g_MouseX , g_MouseY )
else
SetSpritePosition ( pointerSprite , 200 , 200 )
end

Well done guys !! You are the best !!
PM
Mariokiki
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 4th Feb 2016 23:31
Works perfectly in my test level !!

Icons appears correctly once the player collect the treasure...

THANKS !

Attachments

Login to view attachments
PM

Login to post a reply

Server time is: 2024-05-03 11:42:09
Your offset time is: 2024-05-03 11:42:09