Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 4:51:13 PM (17 years ago)
Author:
hejja
Message:

Klasse ist jetzt +- scriptable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/world_entities/script_trigger.cc

    r9869 r10265  
    6060  scriptCalled = false;
    6161  scriptIsOk = false;
    62   triggerRemains = true;
     62  triggerRemains = false;
    6363  addToScript = false;
    6464  this->activeOnCreation = false;
     
    180180   }
    181181
    182   if(triggerRemains && scriptCalled)
     182 if(triggerRemains && scriptCalled)
    183183  {
    184184    executeAction(timestep);
    185185    return;
    186186  }
    187 
    188   if( !invert && this->distance(target) < radius)
    189   {
     187 
     188 if( !invert && this->distance(target) < radius)
     189  {
     190    //printf("Distance is %f \n", this->distance(target));
    190191    executeAction(timestep);
    191192    scriptCalled = true;
     
    193194
    194195  }
    195   else if( invert && this->distance(target) > radius)
     196 
     197  if( invert && this->distance(target) > radius)
    196198  {
    197199    executeAction(timestep);
     
    207209void ScriptTrigger::executeAction(float timestep)
    208210{
    209 
     211  printf("Script %s called \n",this->functionName.c_str());
    210212  if(scriptIsOk)
    211213  {
Note: See TracChangeset for help on using the changeset viewer.