sequence scripting help
3 posts • Page 1 of 1
sequence scripting help
- Code: Select all
(e)=>{
(sim.time - e.geom.controllerAcc) >= scene.my.simtime ? { scene.my.whatever = 1}; e.geom.controllerAcc = sim.time } : {} }
Well I want to update the variable every {scene.my.simtime} and do it 10 times then have a break concept so this would repeat after 60 seconds.
Any Ideas??
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: sequence scripting help
is this even possible? I just need an answer.
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: sequence scripting help
- Code: Select all
sim.time % scene.my.simtime == 0 ? { for(10, (i)=>{ scene.my.whatever = 1 }) } : { }
Theoretically it's possible like above but sometimes it doesn't detect if sim.time % scene.my.simtime is true. Maybe that's because the laser updates at another frequency than sim.time changes. (laser 60 times per second and sim.time 100 times per second)
- Code: Select all
sim.time % scene.my.simtime <= 0.01 ? { for(10, (i)=>{ scene.my.whatever = 1 }) } : { }
is a bit better but it's not perfect, too.
But Kilinich once made some functions for events and triggers and stuff.
x % y is the "modulo" btw. if you don't know. It's the remainder of the division x / y
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests