Author Topic:  cancelling scripts question  (Read 283 times)

0 Members and 1 Guest are viewing this topic.

Palladeonix

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
    • Awards
  • Xbox: ReaperZz176
cancelling scripts question
« on: December 23, 2016, 06:52:09 AM »
I was making a crate out of multiple particles, by putting them into a script and having a proximity detector run the script when i'm in range.

I used a wait and loop script to keep the particles running longer than 2 seconds.

When the player moves out of the range, the block would run a script that would cancel the particle script.

The problem is that if I want multiple of the same particle script(the crate), running at the same time in the same place, the crates all cancel at once if 1 cancel script is executed from 1 proximity block. Any way around this? maybe cancelling a script attached to a certain block?

L3g3nD

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • Awards
  • Xbox: Br4zK L3g3nDv2
Re: cancelling scripts question
« Reply #1 on: December 23, 2016, 07:10:31 AM »
Have you tried to use the proximity option in the particle emmiter ?

(Click on this logo)

.ok

  • Supreme Member
  • *****
  • Posts: 2211
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site+1000 posts Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
Re: cancelling scripts question
« Reply #2 on: December 23, 2016, 08:10:36 AM »
SetPower [x,y,z]

on your particle emitter block,for the best setting for non moving particles,use duration=3 and emit freq=0.999

Also,you don't need that wait command on the script.unless it's to delay the script from canceling.if anything,make the prod setting




Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4254
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: cancelling scripts question
« Reply #3 on: December 23, 2016, 10:16:13 AM »
Here's a super simple solution.

Seeing as you're using proximity detectors and looping script commands, Just make the first section of the script check if rel:0,0,0 is emitting power. I am fairly sure that's a conditional. If it isn't, Just check if it's powered.



This way you aren't canceling any scripts, So it should work just fine.

When there are no players nearby, It will just stop looping the script.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

.ok

  • Supreme Member
  • *****
  • Posts: 2211
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site+1000 posts Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
Re: cancelling scripts question
« Reply #4 on: December 23, 2016, 10:33:43 AM »
Here's a super simple solution.

Seeing as you're using proximity detectors and looping script commands, Just make the first section of the script check if rel:0,0,0 is emitting power. I am fairly sure that's a conditional. If it isn't, Just check if it's powered.



This way you aren't canceling any scripts, So it should work just fine.

When there are no players nearby, It will just stop looping the script.
Idk if this would be good,being each line won't have rel:0,0,0 and how he'll have to offset each one(unless he's doing each thing block by block/1 particle/emitter at a time)




Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4254
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: cancelling scripts question
« Reply #5 on: December 23, 2016, 11:37:33 AM »
Here's a super simple solution.

Seeing as you're using proximity detectors and looping script commands, Just make the first section of the script check if rel:0,0,0 is emitting power. I am fairly sure that's a conditional. If it isn't, Just check if it's powered.



This way you aren't canceling any scripts, So it should work just fine.

When there are no players nearby, It will just stop looping the script.
Idk if this would be good,being each line won't have rel:0,0,0 and how he'll have to offset each one(unless he's doing each thing block by block/1 particle/emitter at a time)


No, I don't think that's what he's doing. I think he's using particle commands to spawn the particles. This way the entire particle creation only takes up 1 block, Which is the proximity detector.


Unless we're on two completely different pages here.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Palladeonix

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
    • Awards
  • Xbox: ReaperZz176
Re: cancelling scripts question
« Reply #6 on: December 24, 2016, 09:06:01 AM »
Father, you're a savoir. Thank you :D