Big Script
11 posts • Page 1 of 1
Big Script
i am a basic thyme scripter and dont even know if this is possable but i want a script that says if the object the script is in collides with another object it will stick no matter what and i mean glue together not magnatism
- crigger61
- Posts: 5
- Joined: Mon Oct 26, 2009 9:22 pm
Re: Big Script
It is possbile.. but you need to have globalID if i remember right.. wait for gradyfitz or some thyme god to reply
But it should be possible.
But it should be possible.
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem
No really just PM me if you have a problem
-
Sniperkasa - Posts: 493
- Joined: Tue Sep 01, 2009 5:34 pm
- Location: The bottom of a lake.
Re: Big Script
Fairly easy use New Method to figure the geomID of the first oject and the GeomID of the second then you do this code
- Code: Select all
scene.addfixjoint ({geom0 := (GeomID of the first); Geom1 := (GeomID of Second); World0pos := e.pos})
-
niffirg1 - Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: Big Script
that would need 2 collisions, right?
Jrv wrote:TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.
GTFO newfgt
-
RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
Re: Big Script
i get what ur saying but i mean an object that hits any not a certain object it will glue to and could keep doing this untill no more area will collide
- crigger61
- Posts: 5
- Joined: Mon Oct 26, 2009 9:22 pm
Re: Big Script
Uhmm hmm......... you would need to use a custom variable and have like an invisible circle around the object you wanted to glue that reads the GeomID of an object before it hits the object you want and that invisible circle puts that GeomID into the custom Variable and then you use that custom variable instead of the Geom1 thing in the code. Just an Idea i haven't a clue if it works. I will upload a picture of what i said on second
-
niffirg1 - Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: Big Script
Yes, you need the geomId of both things, but only works with spawning unless you use the New Method.
Heres a scene using spawning. it does what you are saying, but only with spawned objects.
Heres a scene using spawning. it does what you are saying, but only with spawned objects.
-
Versieon - Posts: 375
- Joined: Tue Sep 01, 2009 4:45 pm
Re: Big Script
crigger61 wrote:i am a basic thyme scripter and dont even know if this is possable but i want a script that says if the object the script is in collides with another object it will stick no matter what and i mean glue together not magnatism
The script:
- Code: Select all
(e)=>{e.this.geomID = 1; e.other.geomID = 2; App.step;App.undo;Scene.addFixjoint {geom0 = e.other.geomID;geom1 = e.this.geomID;};e.this.onCollide = (e)=>{}}
Is that what you want? It uses New Method . Place this code in the object you want to stick to the other objects.
Hopefully it helps .
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: Big Script
gradyfitz wrote:crigger61 wrote:i am a basic thyme scripter and dont even know if this is possable but i want a script that says if the object the script is in collides with another object it will stick no matter what and i mean glue together not magnatism
The script:
- Code: Select all
(e)=>{e.this.geomID = 1; e.other.geomID = 2; App.step;App.undo;Scene.addFixjoint {geom0 = e.other.geomID;geom1 = e.this.geomID;};e.this.onCollide = (e)=>{}}
Is that what you want? It uses New Method . Place this code in the object you want to stick to the other objects.
Hopefully it helps .
that actually works well i just would want one more thing. could it be possable to make it keep on sticking to more and more objects without having to reput the script in every time?
- crigger61
- Posts: 5
- Joined: Mon Oct 26, 2009 9:22 pm
Re: Big Script
crigger61 wrote:that actually works well i just would want one more thing. could it be possable to make it keep on sticking to more and more objects without having to reput the script in every time?
You just have to delete "e.this.OnCollide = (e) => { }"
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
11 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 11 guests