One way would be to pick your random from a string. Just add more of one letter for a higher chance.
Eg.
If you have 3 items A B C and you want,
A high prob
B medium prob
C low prob
Make your string,
"AAAAAABBBBCC"
pick a random letter from string
Don't have an account yet? Then register once and completely free of charge and use our wide range of topics, features and great options. As a registered member on our site, you can use all functions to actively participate in community life. Write posts, open topics, upload your pictures, put your videos online, talk to other members and help us to constantly improve our project and grow together! So, what are you waiting for? Become a part of us today!
Login or registerTo get support for a technical issue such as installing the software, to query a purchase that you've made/would like to make, or anything other than using our software, please visit our Customer Service Desk:
Open a TicketOne way would be to pick your random from a string. Just add more of one letter for a higher chance.
Eg.
If you have 3 items A B C and you want,
A high prob
B medium prob
C low prob
Make your string,
"AAAAAABBBBCC"
pick a random letter from string
What I meant by "run this real time with incoming sound" was
if I were to have say run a guitar lead to the microphone jack
would the effects work real time, Im on a laptop with no mic input
so cannot test at the moment, but think that it will work, from the
documentation I thought you had to record first then add effects
on playback, but I don't think that is the case, I will try to get a
usb mic cable and give it a go.
If interested i can send you a work in progress.
This is great, Thanks,
Literally just what I was looking for,
I was just searching for documentation on the sound generator(which i could not find anything), and this post came up !.
Was looking at making myself a basic synth, and this is perfect.
Just playing around with it at the moment, but a couple of suggetions,
It would be nice if effects could be added globaly to all sounds,
Adding an effect by its name,or an id would be usefull
Maybe ability to load all files at start of frame, then play by id rather than file dialog.
Sorry if ive just missed some options.
Is it possible run this real time with incoming sound ?
I guess this is only for Windows, any plans for Android ?
Thanks again, i will get back to tinkering with it.
Hi,
Getting back to work on a project I have left for a year,
Array files don't seem to be getting added to the app,
or they are but the data is not accessible.
Has something changed as to how this is done ?
Old versions of this project that were ok before now don't get the data
made a quick test app and same problem.
Any ideas ?
Hi, bump this up as I would like to know why this is happening also, if someone can explain.
I managed to work around it using individual actives for each colour, scaling and moving them.
Please login to see this attachment.
I was worried this problem would happen when scaling an application, but I tried it and seems ok .
I would try and do something with the direction changes, seem to sudden and unrealistic,
maybe make the plane loop to turn.
nice graphics, sea and cloud effects good.
Hi, been taking advantage of custom Qualifiers in +, but it can get confusing
sometimes when moving code or objects from one project to another.
So yesterday I got organised and built a small app to view and cross ref.
Qualifiers I have changed.
Thought i would share it if anyone finds it useful.
Zipped file has the .exe, a folder for new images, and the MFA, if anyone
wants to add to or modify it.
Usual thing, the folder "MyQuallies" must be in the same location as the Q View.exe.
The images should be 32x32 and follow the format;
xxname.png
where xx is the qualifier number, 00 - 99 (needs double digits)
and, name is the new name you have called your qualifier.
I put a couple of images in the folder to show it working,
just delete them and put your own.
Please login to see this link.
Thanks for the clarification.
Hi, quick question, seem to remember that this used to work differently,
but I'm probably imagining it ,
An event with a qualifier condition excludes direct actions on objects not included in the event,
eg, 2 actives , A with ID 1 & B with ID 2 both with qualifier "good"
If ID of group"good" =2-------------here an action on qualifier is restricted to the Active with ID 2, OK, but an action directly
on Active with ID 1 (not the qualifier) does nothing.
seemed to remember that once the event had registered "true", you could add an action to any object, but, obviously if
on the qualifier, restricted to the event conditions.
Does that make sense ??
[MENTION]Musta[/MENTION]
QuoteI've only ever put stuff in Groups just as a organization thing
If you mean you never deactivate groups, you are missing out on something important !
Fusion reads and checks every line of code every frame( 60xsec),
but if a group is deactivated, it skips it completely.
Eg,
1. if button clicked--------turn flag1 on
2. if button clicked--------add 10 to altvalA
3. if flag1 on--------------do something
4. if flag1 on & A=10-----do something
5. if flag1 on & A=20-----do something different
above, every frame fusion checks all 5 lines,
1. if button clicked--------activate group1
2. Group1 (inactive at start)
__3. if button clicked--------turn flag1 on
__4. if button clicked--------add 10 to altvalA
__5. if flag1 on--------------do something
__6. if flag1 on & A=10-----do something
__7. if flag1 on & A=20-----do something different
__8. on group activation----deactivate group1
this time fusion only checks line 1 every frame, and only checks the others when the group is activated
by the button click.
this can make a BIG difference to the speed your app runs.
yes, I agree cloning isnt ideal, its just a work around to the problem,
not too bad to change things, just update one, delete the others, the clone again, if you have a foreach loop for setting ids etc.
looks very neat [MENTION]Volnaiskra[/MENTION] , have you created a custom font to get those images in group names ?,
had just been thinking it would be nice if they could be coloured like comments.
I had this problem recently, see post Please login to see this link..
If you can use clones instead of duplicates , they will work the way you want.
if you want the total number of cells that contain a zero in Y
onloop"addup" ........add 1 to counter
& if value loopindex,Y =0
if you want the X positions of the zeros, add a list,
onloop"addup" .......add line to list, Str$( loopindex)
& if value loopindex,Y =0
just loop through the array at the y position you want,
Eg.
when button presed -- start loop "addup"--(number of times= the X size of your array)
on loop "addup" --- add to counter --read value from array xy position (X= loop index"addup" Y= the Ypos you want added up)
If you have a 1 based array just make X =loop index"addup"+1
I do believe that behaviours can be very powerful, creating custom objects, which
can easily be transferred from one project to another.
From the doc, "Behaviors: Behaviors are a list of events, specific to the object."
For the most part they work well, when cloned they work independently, so, I would guess
a block of of code is created for each object and run one after the other, and internally
it must scope the group names, as it does with values and flags.
The problem only seems to be when they are instanced, everything else is still executed
on an individual objects code, reading and changing values, flags etc. on every instance
independently, its only when there is an action on a group that it suddenly decides to
apply this to all the instances.
Logically, you could argue that this shouldn't happen, and they should act as they do when cloned,
or, you could argue that there should be one code for all instances, changing values, flags etc. for all
But not half and half, it serves no use.
OK, thanks for your answers,
but, these groups inside behaviours have been giving me a real headache !.
Trying to work around the problem I have now found more peculiarities,
Even if you only have one object with a behaviour and you destroy it,
if you create a new object, it is created with with the groups in the same
state as the first objects when it was destroyed,
also the new object will ignore limit events already met by the first object.
I think I have a solution if anyone needs it,
I gave the object a "reset" flag, which i set on in the create event,
then the first line in the behaviour "if reset on" - then an action to close all the groups - reset off,
seems to do the trick so far.
Please login to see this attachment.
Yes fredetmumu, your right, the problem is with the groups,
actions on groups effects all instances....which is wrong !
The whole point of behaviours is that they run independently
This puts serious limitations on the code you can use in a behaviour
if you want to create the object at runtime.
I can get around it by creating clones instead, and running a for each loop to
load individual settings, and they work properly, I don't need too many
copies, but if i wanted hundreds or thousands it would be impractical.
I haven't found any other reference to this problem, but a few more recent
posts stating "with 2.5+ now no down side to behaviours",
well, this is a big one if it hasn't been changed.
Line 6 also has the command to set "start" off which stops the group move from opening, which it does.
the problem is that it only does this when one of the actives meets the condition, but then the action is applied to all the actives.
With line 6 activated I would expect each active to stop one by one as they reach the right of the screen,
but what happens is that when the faster two reach the right, they dont stop, and when the last active reaches the right, they all stop.
Almightyzentaco (Fusion 2.5 Tutorials)
Captain Quail (Firefly Tutorials)