Scripts / Image script need

Author
Message
KustuGaming
8
Years of Service
User Offline
Joined: 5th Jan 2016
Location:
Posted: 7th Jan 2016 13:53
Hey guys. I'm very new in Game Guru (about 3 day), and i need one script. When i'm enter in story zone first image comes, and then i press E, second image come, and when i press E again picture hide, and unfreeze player.

I have code


function storyinzone_init(e)
LoadImages("Kuslandz",0)
LoadImages("Kuslandz",1)
end

function storyinzone_main(e)
if g_Entity[e]['plrinzone']==1 then
PlaySound(e,0)
SetImagePosition(50,50)
ShowImage(0)
FreezePlayer()
Prompt ("Press E to Continue" )
if g_KeyPressE == 1 then
ShowImage(1)
Prompt ("Press K to start game" )
if g_KeyPressK == 1 then
FirstRun = 1
UnFreezePlayer()
HideImage(1)
Destroy(e)
ActivateIfUsed(e)
end
end
end
end
end


But it is dont work, because if i press E after, this picture come, but if i relased button its gone, and pict 1. back.

Sorry, but i dont know some commands, because i don't know, what i need to add!
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 7th Jan 2016 14:55
You must understand that GG never stays in one line, instead he run the script again and again really fast. So you must set states for yourself:



Hope this works for you. Did not test it, cause lack of time
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
KustuGaming
8
Years of Service
User Offline
Joined: 5th Jan 2016
Location:
Posted: 7th Jan 2016 20:55
i know, what is problem to, but i don't know, how fix it. But now i have http://prntscr.com/9na9qp error. How can i fix it?
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 8th Jan 2016 12:01
Ok I work this script out:



If you get this error still, then check if your images are in scriptbank/images/Kuslandz
I canĀ“t replicate this error. sorry...
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 8th Jan 2016 14:46 Edited at: 8th Jan 2016 14:47
This works for me. Thank you.

For those who need it. Script attached below
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

Attachments

Login to view attachments
KustuGaming
8
Years of Service
User Offline
Joined: 5th Jan 2016
Location:
Posted: 8th Jan 2016 14:47
Thank you very much. this is now work. Very cool
PM

Login to post a reply

Server time is: 2024-12-22 12:51:40
Your offset time is: 2024-12-22 12:51:40