Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Weird question #443415
07/15/14 21:36
07/15/14 21:36
Joined: Aug 2013
Posts: 39
A
Adulescens Offline OP
Newbie
Adulescens  Offline OP
Newbie
A

Joined: Aug 2013
Posts: 39
Hello guys,

I am a beginner and sorry that I am disturbing you with that simple question: How can I set offline a function? I have been trying it with setting my_function() = off or with NULL but it doesn't exist wink Could you help me?

Thank you!
~Adulescens

Re: Weird question [Re: Adulescens] #443417
07/15/14 22:16
07/15/14 22:16
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
What is the context of that question/ problem?
One easy way (assuming I understand your issue correctly) is to use global variables:

var my_function_off = 0; // or call it _on and set it to 1 at game start

void my_function()
{
if(my_function_off) return;
... your regular my_function content here
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Weird question [Re: Superku] #443438
07/16/14 15:12
07/16/14 15:12
Joined: Aug 2013
Posts: 39
A
Adulescens Offline OP
Newbie
Adulescens  Offline OP
Newbie
A

Joined: Aug 2013
Posts: 39
Yea the situation is: the function, which should stop is a part of a button:
button (0, 0, button_pic, button_pic, button_pic, function_on, function_mouse_off, function_mouse_on);

The function_mouse_on starts when the mouse touch on the picture/button and when the mouse leaves the picture/button the function_mouse_on continues until it ends but it shouldn't! The function_mouse_on should quickly stop when the mouse leaves the button (as known as the function_mouse_off starts), because the function_on mouse needs about 5 seconds to finish, but it should quickly stop when the function_mouse_off is on.

Last edited by Adulescens; 07/16/14 15:20.
Re: Weird question [Re: Adulescens] #443447
07/16/14 17:57
07/16/14 17:57
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
There is function that checks if your cursor is over the bmp. You could have an if statement in your on-function that checks if the mouse is on the bmap. Not home so I can't be more specific -sorry laugh


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Weird question [Re: DLively] #443456
07/16/14 20:19
07/16/14 20:19
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
mouse_panel


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Weird question [Re: DLively] #443487
07/17/14 10:16
07/17/14 10:16
Joined: Aug 2013
Posts: 39
A
Adulescens Offline OP
Newbie
Adulescens  Offline OP
Newbie
A

Joined: Aug 2013
Posts: 39
Ahh yea I could try it withe mouse_panel, thank you! laugh


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1