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
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 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
Function freezing #73045
05/03/06 05:43
05/03/06 05:43
Joined: Dec 2003
Posts: 179
Chameleon_Man Offline OP
Member
Chameleon_Man  Offline OP
Member

Joined: Dec 2003
Posts: 179
Hey guys,

Okay, I understand from using C-Script that the code is read top to bottom, and when a function is read, it initiates the function while continuing to read the code. How do I do it so that when it gets to the function, it stops and goes through the function, and at the end of the function it continues on its path? I'm used to simple command-line C++, so C-Script somewhat confuses me. Thanks a ton guys.

-Harb

Re: Function freezing [Re: Chameleon_Man] #73046
05/03/06 05:47
05/03/06 05:47
Joined: Aug 2003
Posts: 7,440
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,440
Red Dwarf
Lets just suppose i didnt read the sentence "and at the end of the function it continues on its path? " because it makes absolutely no sense.

Lets just suppose I just read your thread title, then while loops are what you are looking for:

var somevariable;

function dosomething
{
while(1){
while(somevariable){wait(1);}
//add some stuff here
wait(1);
}
}

you just have to set var somevariable to 1 to freeze the function.


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku

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