Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Feedback Suggestions and improvements v
« Previous 1 … 15 16 17 18 19 … 36 Next »
Advanced Duplicator Priority
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Advanced Duplicator Priority
18-12-2018, 07:35 PM, (This post was last modified: 18-12-2018, 07:38 PM by exoRift. Edited 1 time in total.)
#1
exoRift Offline
TSCM Member
***
Posts: 16
Threads: 10
Joined: Nov 2018
Advanced Duplicator Priority
If possible, I think all wire chips that contain code should be spawned last. For example, if you have a chip wired to the elevator pod of a lift system, the inputs may fail since the pod spawns as a result of the shaft being spawned. (Meaning it's delayed). Although it's not standard since Auto Parenting should be used, this also can be a problem when you use `constraint.findEntity`.

EDIT: This is also a problem when you have an entity as an input and immediately try to run a method on it in your code (such as Vehicle:driver()) because the port is null until the prop spawns.
Find
Reply
18-12-2018, 08:58 PM,
#2
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: Advanced Duplicator Priority
this is why you use the duped function (i forget what the function is called)

[Image: efN9HsZ.png]
Find
Reply
18-12-2018, 10:27 PM,
#3
exoRift Offline
TSCM Member
***
Posts: 16
Threads: 10
Joined: Nov 2018
RE: Advanced Duplicator Priority
You mean like if duped then wait? I don't know. It'd kinda be annoying to implement into every chip when you can do something more consistent which is my suggestion.
Find
Reply
19-12-2018, 03:10 AM,
#4
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: Advanced Duplicator Priority
(18-12-2018, 10:27 PM)mets11rap Wrote: You mean like if duped then wait? I don't know. It'd kinda be annoying to implement into every chip when you can do something more consistent which is my suggestion.

yes annoying to add like 1 or 2 lines to the beginning to every e2

[Image: efN9HsZ.png]
Find
Reply
19-12-2018, 10:35 AM,
#5
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Advanced Duplicator Priority
Having chips load after other entities would make it even worse, as wires would no longer be restored. Remember that chips are defining their inputs/outputs in code, so they have to execute first in order to have their I/O ready for the duplicator to restore wiring to.

For Starfall, you should use the input hook to detect when inputs are available. This is fired not only when an input is wired with the tool, but also after the duplication process restores the appropriate wiring and after a chip's code is updated.

For E2, there's the triggering system and the ~ operator to detect when something is wired.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread:
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.