Spawning problem (object spawned under mouse arrow)
5 posts • Page 1 of 1
Spawning problem (object spawned under mouse arrow)
Hi everybody, I'm trying to make a spawn cannon but I have some problems with a code:
(e)=>{Scene.importphunlet("Cannon Projectile")({vecs = [e.pos]})}
The projectile should spawn into the cannon but it spawns under the mouse arrow, I had this problem other times and I never succeeded to solve it, do you have a solution ? Thanks for reading
(e)=>{Scene.importphunlet("Cannon Projectile")({vecs = [e.pos]})}
The projectile should spawn into the cannon but it spawns under the mouse arrow, I had this problem other times and I never succeeded to solve it, do you have a solution ? Thanks for reading

-

PhunWars - Posts: 78
- Joined: Wed Dec 30, 2009 11:01 pm
Re: Spawning problem (object spawned under mouse arrow)
Phunlets always spawn under the mouse. It seems like there's no fix for this, but I'm not sure.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: Spawning problem (object spawned under mouse arrow)
you can save the whole phunlet and put onto your script(and removing small parts of it). hovewer, it will lag and be hard to do for more complicated contraptions
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: Spawning problem (object spawned under mouse arrow)
yeah, you can do that by selecting the entire actual phunlet or object as it is on screen that you want to spawn, then hitting Ctrl + C, then going to notepad and using paste. it should look like this...
start selecting where the file info stops and the scene.addsomething starts. put it in a script, change all of the pos:= to match where you want to spawn and you're done.
Hint: Try putting the phunlet at the origin of the scene before you hit Ctrl + C, because then you can add the pos you see in the notepad with e.pos, and it will work.
- Code: Select all
// Phunlet created by Algodoo v1.6.0
FileInfo -> {
title = "Magnet attachment";
author = "Ian151";
version = 6
};
Scene.addBox... etc.
start selecting where the file info stops and the scene.addsomething starts. put it in a script, change all of the pos:= to match where you want to spawn and you're done.
Hint: Try putting the phunlet at the origin of the scene before you hit Ctrl + C, because then you can add the pos you see in the notepad with e.pos, and it will work.
-

Ian151 - Posts: 47
- Joined: Tue Sep 01, 2009 12:02 am
Re: Spawning problem (object spawned under mouse arrow)
Thanks guys I have already searched some days ago for the solution (after i posted the problem) and now I solved it (I found a tutorial similar to Ian's post
) Thanks for answers, problem solved then 

-

PhunWars - Posts: 78
- Joined: Wed Dec 30, 2009 11:01 pm
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests




