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
0 registered members (), 18,561 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
Page 1 of 2 1 2
event in C-Lite (Still need Help) #122737
04/10/07 15:30
04/10/07 15:30
Joined: Sep 2006
Posts: 128
Sweden
Tiinusen Offline OP
Member
Tiinusen  Offline OP
Member

Joined: Sep 2006
Posts: 128
Sweden
Im used to work with events in C-Script. now i have started to code C-Lite.
and what I see. this code wont work. I have read the Migration Guide but i didnt find any useful information there to anserw my question.
Do you got any suggestion?

Code:

function trigger_event
{
if (event_type == EVENT_TRIGGER)
{
ent_playsound(me,whamm,50);
}
// etc. ...
}
action door
{
...
my.trigger_range = 100;
my.ENABLE_TRIGGER = ON;
my.event = trigger_event;
...
}



Thanks in forehand

Last edited by Tiinusen; 04/10/07 15:52.

Where is my manual? i think i lost it. i have been searching everywere. ohh there it is F1 I'm 17 years old, with 4 years of programing I can programming a lot of languages check my Bio out,
Re: event in C-Lite [Re: Tiinusen] #122738
04/10/07 15:39
04/10/07 15:39
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Event type is an engine var, so EVENT_TYPE.

Re: event in C-Lite [Re: TWO] #122739
04/10/07 15:41
04/10/07 15:41
Joined: Sep 2006
Posts: 128
Sweden
Tiinusen Offline OP
Member
Tiinusen  Offline OP
Member

Joined: Sep 2006
Posts: 128
Sweden
thanks. but the second question i cant solve. i cannot use.

my.trigger_range = 100;
my.ENABLE_TRIGGER = ON;
my.event = trigger_event;

explain why i get error


Where is my manual? i think i lost it. i have been searching everywere. ohh there it is F1 I'm 17 years old, with 4 years of programing I can programming a lot of languages check my Bio out,
Re: event in C-Lite [Re: Tiinusen] #122740
04/10/07 15:53
04/10/07 15:53
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
I think my.emask |= ENABLE_TRIGGER; should do the job.

Re: event in C-Lite [Re: TWO] #122741
04/10/07 16:00
04/10/07 16:00
Joined: Sep 2006
Posts: 128
Sweden
Tiinusen Offline OP
Member
Tiinusen  Offline OP
Member

Joined: Sep 2006
Posts: 128
Sweden
ok, i get error in my.trigger_range = 100;


Where is my manual? i think i lost it. i have been searching everywere. ohh there it is F1 I'm 17 years old, with 4 years of programing I can programming a lot of languages check my Bio out,
Re: event in C-Lite [Re: Tiinusen] #122742
04/10/07 16:07
04/10/07 16:07
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Code:

void trigger_event()
{
if(event_type == EVENT_TRIGGER)
{
}
}

action beer()
{
if(my==NULL) error("NO ME!1111");
my.trigger_range = 100;
my.emask |= ENABLE_TRIGGER;
my.event = trigger_event;
...



Is my set?

Re: event in C-Lite [Re: TWO] #122743
04/10/07 16:28
04/10/07 16:28
Joined: Sep 2006
Posts: 128
Sweden
Tiinusen Offline OP
Member
Tiinusen  Offline OP
Member

Joined: Sep 2006
Posts: 128
Sweden
well thank you. that solved the problem. one more question
how do solve my.enable_impact = ON; and other different event types?
im going to use some different types of events. so tell me how to make them work.
because i get error when i uses my.enable_impact = ON; is there something thats changed from C-Script to C-Lite?


Where is my manual? i think i lost it. i have been searching everywere. ohh there it is F1 I'm 17 years old, with 4 years of programing I can programming a lot of languages check my Bio out,
Re: event in C-Lite [Re: Tiinusen] #122744
04/10/07 16:34
04/10/07 16:34
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
my.emask |= (ENABLE_TRIGGER|ENABLE_ENTITY|ENABLE_WHATEVER);

Re: event in C-Lite [Re: TWO] #122745
04/10/07 16:37
04/10/07 16:37
Joined: Sep 2006
Posts: 128
Sweden
Tiinusen Offline OP
Member
Tiinusen  Offline OP
Member

Joined: Sep 2006
Posts: 128
Sweden
thanks that explained all my questions.

Thanks for your help Bloodline. its good there is people like you out there
to anserw to people like me's anoying questions


Where is my manual? i think i lost it. i have been searching everywere. ohh there it is F1 I'm 17 years old, with 4 years of programing I can programming a lot of languages check my Bio out,
Re: event in C-Lite [Re: Tiinusen] #122746
04/10/07 16:56
04/10/07 16:56
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
No problem

Page 1 of 2 1 2

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