Spawning problem (object spawned under mouse arrow)

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

Spawning problem (object spawned under mouse arrow)

Postby PhunWars » Wed Dec 30, 2009 11:31 pm

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 :D
Image
User avatar
PhunWars
 
Posts: 78
Joined: Wed Dec 30, 2009 11:01 pm

Re: Spawning problem (object spawned under mouse arrow)

Postby Chronos » Thu Dec 31, 2009 1:52 am

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
User avatar
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)

Postby RA2lover » Thu Dec 31, 2009 1:29 pm

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
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: Spawning problem (object spawned under mouse arrow)

Postby Ian151 » Thu Dec 31, 2009 8:01 pm

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...

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.
"THE BEST 2 PLAYER SCENE EVER MADE!!!" - ianno
http://www.algodoo.com/algobox/details.php?id=24204
Image
User avatar
Ian151
 
Posts: 47
Joined: Tue Sep 01, 2009 12:02 am

Re: Spawning problem (object spawned under mouse arrow)

Postby PhunWars » Fri Jan 01, 2010 8:54 pm

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 :D
Image
User avatar
PhunWars
 
Posts: 78
Joined: Wed Dec 30, 2009 11:01 pm


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 4 guests