Time Triggers

Discussion in 'Modding and Scripting Support' started by Lord God Jinnai, Sep 17, 2002.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. Lord God Jinnai

    Lord God Jinnai New Member

    Messages:
    14
    Likes Received:
    0
    Joined:
    Feb 3, 2002
    Can i script an event to happen at a certain day/time even if my person isn't there? and ifso how?

    Can this also be done based on a quest that is completed?

    I'm trying to make some orcs raid and destroy a town, but i want this not to happen before you've had a chance to discover if they are there and then visit the town which will start a timespan of 30 days before the orcs raid? is this possible?
     
  2. Ruelz

    Ruelz New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    I usually try not to post if I don't know what i'm talking about, but in this case, I have a feeling that what you are trying to do is more complicated than most would try on a usual basis, and so--since I've seen this sitting here all day wihtout a reply--I thought I would offer what help I could.

    First of all, it IS possible to do what you want, and knowing that is the first step. I have taught myself much of the worlded, and the very first step is in discovering that what you want can be done. In Arcanum there is a quest where you havr to wait 5 days before this little halfling guy will give you the money he owes madam lil's. This tells me that there is a way to keep track of days in scripts. To this end, I suggest visiting Dark Underlord's page and downloading the arcanum scripts he has there. You can look up that quest and see how it was done. What I am about to offer you is a SUGGESTION, and please don't gripe if this doesn't work. As I said, one has to be creative when one tries for effect.

    Try hooking up a script to increment a global variable for each passing day. For example, say we let the passing of days = gv1006

    We could try, IF it is daytime,
    THEN global variable 1006 = global variable 1006 + 1

    The cooresponding script options you are looking for is:
    IF it is daytime,
    THEN (num) = (num) + (num)

    Then you attach a script to the group of orcs, something to the effect of:
    IF golbal variable 1006 = 30 (for thirty days)
    THEN Call Script X at line (num)

    I have you call a separate script here because it will be easier for you to string along action statements in a separate script then to try and do it all in one.

    As far as your character needing to be there, I am not entirely sure if that will work or not... It may be possible to use a local script that the character is forced to trigger to cause the one mentioned above to go into effect. For example, surround the start location of the player with tilescripts that force the day-counting script to begin. Since we are using GLOBAL variables, it should work.

    Again, i cannot guarentee the veritablilty of this idea--i am not in front of a computer with arcanum on it, so I cant test it out. But hopefully this will give you a start, so if it doesnt work you might be able to figure the rest out.

    Best of luck,
    Ruelz
     
  3. Ruelz

    Ruelz New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    OK then. No repsonse, but I've researched the problem further for you. Without going into an unnecessarily long explanation, everything you need to know can be found in the second portion of AMTUT part 4. I have read it carefully, and it tells you how to set timed triggers up for an inn, so that you can pay for a bed for a varying length of time. If you take what you learn from that and apply it to a tinmed trigger that will execute an orc attack, you should have what you need.
     
  4. Lord God Jinnai

    Lord God Jinnai New Member

    Messages:
    14
    Likes Received:
    0
    Joined:
    Feb 3, 2002
    Thanks...though i will it still execute even if the hero isn't there? Actually i'd perfer that, so is there any way to do that?
     
  5. Ruelz

    Ruelz New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    The only way to trigger a script like that would be if the hero character interacted with something. For example, you can tie in that script with the particular tile in the town you wanted to be attacked, but it wouldn't load until the character entered that sector. So for the creative scripter, here is what I recommend:

    Place a Tile Script in an area that the character cannot avoid, no matter what. Put it in a gateway to get out of a town or something. This can be ANYWHERE. Have that script tie in and activate the timer that you created in order to begin the countdown until the orc invasion. This will have it in the process of going, even though the character is still somewhere way across the map.

    Another good tie-in point would be if the character talked to a certain person in a town who TOLD them of the impending orc attack, which then would call the orcattack script from that point. So it is not necessary to have the character go to the town to begin the countdown, but the character MUST in some way start the domino effect that will culminate in activation of your attack.

    Hope this helps! SOrry this took so long to get back to you, got hit by the tornado in Indy and have had no power forever!
     
  6. Lord God Jinnai

    Lord God Jinnai New Member

    Messages:
    14
    Likes Received:
    0
    Joined:
    Feb 3, 2002
Our Host!