Jump to content

Recommended Posts

Posted

ED, 

 

 

 

Please, pretty please add a random time condition in the ME.

Variables should include:

Min: (time in seconds)

Max: (time in seconds)

 

This would really make missions better and less predictable. 

 

Cheers

Dale

 

 

 

 

 

 

Posted (edited)

According to Suntsag et al, that's what 'RANDOM' condition is now. The ACTION will DEFINIETLY HAPPEN, it's just DELAYED by the size of the RANDOM number provided. /facepalm.

Edited by Elphaba
  • 1 month later...
Posted (edited)

You could also add a doscript IF/Trigger by pasting the following code, I think you can set to continuous to have it fire true although I'm not 100% sure on the ME implementation or how you would set it up but the code is pretty simple;

if math.random() > 0.95 then -- return a random value between 0 and 1 and evaluate on % chance, here this is a 5% chance to fire
  -- do something or enable an action
end

-- you can also supply 1 single argument and that will be the max time, or specifically min & max time in seconds by giving it 2 args
local your_min_time, your_max_time = 1, 10
if timer.getTime() > your_min_time and (timer.getTime() > your_max_time or (timer.getTime() < your_max_time and math.random() > 0.95 )) then
	-- do things
end

-- again I don't know how the ME lets you chain this together or when you want to evaluate but maybe this to makle it more flexible;
local function time_delay(chance, your_min_time, your_max_time)
  local time_now = timer.getTime()
  -- call this when you want to return a random delay and you can do it in a number of ways, all args are optional
  -- add this function one time in a seperate bit of doscript on mission start then you can use like below...
  return (time_now > (your_min_time or 0)) and ((your_max_time and time_now > your_max_time) or (time_now < (your_max_time or 86890) and (math.random() > (chance or 0.001)))) -- returns true or false based on args supplied
end

-- call like this...
if time_delay(0.5, 10, 100) then -- or time_delay(0.5) if you only want chance, or time_delay(0.5, 50) for 50% chance after 50 secs... or less than 50 secs.. time_delay(0.5, nil, 50)
  -- do stuff
end

.... I got carried away there

I wrote that off the cuff so there may be typo errors, but im sure youll find them.

Edited by PravusJSB

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...