Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: FUBAR-BDHR on September 12, 2008, 07:42:00 pm

Title: Quick rand-multiple-of question
Post by: FUBAR-BDHR on September 12, 2008, 07:42:00 pm
Working on a mission the other night I think I was over thinking how rand-multiple-of works.  If I say do the following

when-argument (repeat say 5 times)
--rand-multiple-of
--->(list of say 20 different items)
--true
--modify-variable
---->(whatever)
----><argument>
--invalidate-argument
----<argument>

Will it pick 5 different things out of the list or can there be duplicates? 
Title: Re: Quick rand-multiple-of question
Post by: karajorma on September 13, 2008, 01:44:56 am
Rand-multiple-of (in fact all the -of SEXPs) will only pick a valid argument. Since you're invalidating the argument you've just picked you shouldn't see a duplicate.
Title: Re: Quick rand-multiple-of question
Post by: FUBAR-BDHR on September 13, 2008, 02:14:19 pm
That's what I was starting to think but wanted to make sure.  I think I confused myself when I made that random gauntlet that did allow for multiple hits using variables and rand-multi.  Well anyways it will the event it was using it for much cleaner to look at and edit.  It works the way I wrote but it isn't pretty.