Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (Martin_HH, steyr, alibaba), 509 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Very simple collision [Re: sadsack] #226273
09/08/08 20:00
09/08/08 20:00
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Hi all,

Ok, I don't understand why I am getting syntax error on this.
It is just like it is in the manual.
Does anyone know why??????????



Quote:
action exploding_barrel()
{
my.ENABLE_IMPACT = ON; // sensible for push collision
my.emask |= ENABLE_IMPACT;
my.event = bounce_event;
...
}


From Manual


Thank you
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: Very simple collision [Re: sadsack] #226277
09/08/08 20:23
09/08/08 20:23
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
LOL, you are using both scripting languages.

my.ENABLE_IMPACT = ON; is c-script and my.emask |=ENABLE_IMPACT; is lite-c.

Like i've said before, you can't use both or else the compiler will complain. That's why the code in the manual is highlighted in different colours (usually green for lite-c code).

anything with = ON; is c-script and you cannot use it.

Re: Very simple collision [Re: DJBMASTER] #226294
09/08/08 22:29
09/08/08 22:29
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
That nice to know after all this time.
Thank You
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: Very simple collision [Re: sadsack] #226295
09/08/08 23:09
09/08/08 23:09
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Hi All,
Well I found what the manual said is lite-c
It still will not compile. I think it does not compile for, I don't know how you call a function. I was thinking that this called it ( my.event = bounce_event;) So I don,t know.
here is the error




From what the manual say this should work, but the manual hides alot of stuff.
Why will this not compile?
Thank You
renny

Last edited by sadsack; 09/08/08 23:11.

I have A7 Commercial .............. Now I just need to learn how to use it

Re: Very simple collision [Re: sadsack] #226301
09/09/08 00:51
09/09/08 00:51
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
never mind I found some things I did wrong, let me see if I can get it working.
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: Very simple collision [Re: sadsack] #226436
09/09/08 19:26
09/09/08 19:26
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Hi all,

Well I am close, I have very good collision now.
All I need now is how do one call a function????
See photo below of collision, when the collision happens
both the plane and the missile stop.



Here is the code where I need to call the function.
Code:
action act_ship1()
{
ship1 = me;
my.emask |= ENABLE_IMPACT; // make entity sensitive for block and entity collision
 
 
while(1)
{
	
if (key_z) {me.pan += 3*time_step;}
if (key_x) {me.pan -= 3*time_step;}
//{c_move (me,vector( -2,0,0),nullvector,0);}

c_move(me,vector(-5*time_step,0,0),nullvector,0); // move ahead until obstacle is hit


wait(1);
{

}

}
}



No matter how I try to call the function that act's on the collision I get undeclared indentifier.

Here is my function I need to call

Code:

function bounce_event() 
{
  switch (ENABLE_IMPACT)
  {
    case EVENT_BLOCK:
      sys_exit ("bye bye");
      return;
    case EVENT_ENTITY: 
      sys_exit ("bye bye");
      return;
  }
}  



I can not find how to call a function in the manual.
So can anyone help?


I have A7 Commercial .............. Now I just need to learn how to use it

Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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