🛈 Announcement
Greetings! Far Cry forums are now archived and accessible in read-only mode, please go to the new platform to discuss the game.
  1. #21
    Originally Posted by Steve64b Go to original post
    I may have found an annoying bug with scripting: spawning in duplicate objects in a script will internally all still point to a single object.
    When Ubi released for the first time the script tools, i remember that while testing this spawn/unspawn function, trying the word "alpha" with the letters, each time it would spawn properly but after, via delay, when trying to trigger with the unspawn script, one "a" of the word alpha will still be there.
    So yeah, duplicate objects are an issue, even when you choose them from the library twice, (no copy) (id objects seems messed up at this point for some scripts)
    Share this post

  2. #22
    Steve64b's Avatar Senior Member
    Join Date
    Jul 2016
    Location
    http://steve.farcry.eu/
    Posts
    1,628
    Originally Posted by FlyingSpiritus Go to original post
    When Ubi released for the first time the script tools, i remember that while testing this spawn/unspawn function, trying the word "alpha" with the letters, each time it would spawn properly but after, via delay, when trying to trigger with the unspawn script, one "a" of the word alpha will still be there.
    I seem to have noticed that too in my Evil Dead map. Turns out a copy of the object was made in the map when I linked the object to a script action. I think this happens when you deal with objects that are already linked to some (other) scripts. Sometimes the editor loses track of which object(s) you mean, and maybe decides to throw in a copy of the object you're referring to for it to make sense.
    Share this post

  3. #23
    :There should be an option of the trigger working always,"

    Amen!!!
    Share this post

  4. #24
    Steve64b's Avatar Senior Member
    Join Date
    Jul 2016
    Location
    http://steve.farcry.eu/
    Posts
    1,628
    Technically each trigger can only be triggered once. Aside from that, this one shot already _always_ works.

    It's the script execution that is the problem; scripts can't execute in parallel, so it's one after another. Plus new AI won't spawn until less than 12 AI are active in the map. And finally, Trigger Event triggers execute prematurely when tied to multiple copies of the same asset that were spawned from the same script.
    Share this post

  5. #25
    I'm just a bit baffled we don't have RANDOM scripts available still. Part of the fun in playing a mission is to have variables to make it more replayable..
    Share this post

  6. #26
    Steve64b's Avatar Senior Member
    Join Date
    Jul 2016
    Location
    http://steve.farcry.eu/
    Posts
    1,628
    You can simulate randomness by having 2 animals in a death pit fighting it out. Each one's kill event triggering a different script.

    But yeah, ideally we shouldn't have to workaround things by using such exploits. I'm even resorting to unspawning scripts to prevent them from running sometimes. No clue what that does to the engine, but in gameplay it seems to work.
    Share this post