Page 2 of 2

Re: [HELP] How can I set rotation dynamically?

Posted: Fri Nov 16, 2012 9:22 pm
by petri
You guys are CRAZY! This made my day :)

Re: [HELP] How can I set rotation dynamically?

Posted: Fri Nov 16, 2012 10:28 pm
by JohnWordsworth
@Komag: This might count as abusing petri's game engine - but it seems to be standing up to it! :p

This technique actually also has some other uses too though I guess (it might already have been done somewhere). For instance...
SpoilerShow

Code: Select all

monsters = {"crab", "crowern", "goromorg", "green_slime", ...};

for i=1, #monsters do
cloneObject {
  name = monsters[i] .. "_immune_to_fire",
  baseObject = monsters[i],
  onDamage = function(monster, damAmount, damType) 
    if ( damType == "fire" ) then 
      return false;
    end

    return true;
  end,
}
Just a handful of lines of code and (if you finish off the list of monster IDs list) you've cloned every single monster with a new version that is immune to fire. You could presumably use this technique to give all of your monsters a specific 'onDie' hook or all of your doors a new onOpen/onClose hook that means they don't work if you have a special condition (broken fingers or something).

Re: [HELP] How can I set rotation dynamically?

Posted: Fri Nov 16, 2012 11:47 pm
by Batty
Now we need alcove overclocking competitions to see who can run the most & still have a working dungeon :lol: (throw in some LightSource objects too for the water cooled rigs) :geek:

Re: [HELP] How can I set rotation dynamically?

Posted: Sat Nov 17, 2012 2:15 am
by Neikun
Alcoves... *sniffle* They grow up so fast~

Re: [HELP] How can I set rotation dynamically?

Posted: Sat Nov 17, 2012 12:47 pm
by Edsploration
Awesome awesome! I'm thrilled to see this much works. I think I can move forward with some really crazy stuff. Thanks for exploring the topic everyone :mrgreen: