Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 7, 2006, 3:37:12 PM (18 years ago)
Author:
snellen
Message:

setTarget should work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/script_trigger.cc

    r8178 r8199  
    1616void ScriptTrigger::loadParams(const TiXmlElement* root)
    1717{
     18  WorldEntity::loadParams(root);
     19 
    1820   /*{ LoadParam(root, "file", this, ScriptTrigger, setScript)
    1921        .describe("the fileName of the script, that should be triggered by this script trigger")
     
    4345
    4446
     47void ScriptTrigger::setTarget(const std::string& target)
     48{
     49  BaseObject* targetEntity = ClassList::getObject(target, CL_WORLD_ENTITY);
     50 
     51  if (targetEntity != NULL)
     52  {
     53    this->setTarget(dynamic_cast<WorldEntity*>(targetEntity));
     54  }
     55  else
     56  {
     57    PRINTF(2)("Target %s for %s::%s does not Exist\n", taget.c_str(), this->getClassName(), this->getName());
     58  }
     59}
    4560
    4661void ScriptTrigger::tick(float timestep)
Note: See TracChangeset for help on using the changeset viewer.