How do I...?
16 posts • Page 1 of 1
How do I...?
How do i spawn phunlets? I saved a bullet and i want to make a compact gun, so i need to spawn the bullets
onlaserhit, but i dont know how . So tell me what i need to put in the script box please.
onlaserhit, but i dont know how . So tell me what i need to put in the script box please.
- ligglo
- Posts: 16
- Joined: Thu Feb 11, 2010 5:00 am
Re: How do I...?
from what i remember the command is called scene.importphunlet("name") or something similar, the problem is they spawn at your mouse not where the laser hits so the command is pretty useless. the best you can do for spawning complicated objects is to script the entire contraption (alltho a little advanced trigonometry is involved when spawning stuff at an angle+distance)
- Mr_Stabby
- Posts: 155
- Joined: Wed Dec 16, 2009 12:16 am
Re: How do I...?
Or you could just select what you want Save it with Ctrl + C and then put it into an object oncollide code.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: How do I...?
which wont help you a single bit when you try to spawn stuff at an angle
- Mr_Stabby
- Posts: 155
- Joined: Wed Dec 16, 2009 12:16 am
Re: How do I...?
I did exactly this! might help you ( I spawned a scene insdead ) JUst dig though to a black trasparent boxes at the clip ;P
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: How do I...?
Thanks.. Can you please teach me how to spawn a polygon then? Oh and btw i like taking things aparte and i did to ur gun and found the spawner . To me, even after a long time, thyme is still prety hard for me to understand . ill take anything i can . I can do custon varables, spawn circles, squares, lasers, tracers, change colors,density, and other simple things. I do still need to figure out a lot of stuff .
Thanks in advance
Thanks in advance
- ligglo
- Posts: 16
- Joined: Thu Feb 11, 2010 5:00 am
Re: How do I...?
scene.addpolygon({pos:=e.pos; vecs:=[[-1, 0], [0, 1], [1, 0]]}) spawns a triangle, basically the vecs attribute follows the format of [ [x1, y1], [x2, y2], [x3, y3], [etc..] ] which tells algodoo to draw a polygon in connect the dots method, the coordinates you give it in vecs modifier are local meaning you dont have to specify their location in worldspace and it will automatically calculate its center and place it to pos
- Mr_Stabby
- Posts: 155
- Joined: Wed Dec 16, 2009 12:16 am
Re: How do I...?
but to get those points you must create the polygon, copy it using ctrl-c, then you have to paste it onto a word document, copy the points on that(not the whole thing, just the points), and plug those in on the script code that mr.stabby wrote out...
canadian joe wrote:im just writing this so i can sig it
RicH wrote:Phun's Army.
-
canadian joe - Posts: 115
- Joined: Wed Feb 10, 2010 9:42 pm
Re: How do I...?
So what? That isn't very difficult.
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: How do I...?
So what is wrong with this:
Scene.addPolygon {
surfaces := [[[0.08333337, 0.83333325], [-0.030303001, 0.71969676], [-0.14393938, 0.60606074], [-0.2575757, 0.49242425], [-0.37121212, 0.37878776], [-0.4848485, 0.26515126], [-0.5984848, 0.151515], [-0.7121211, 0.03787875], [-0.82575756, -0.07575774], [-0.9393939, -0.189394], [-1.0530303, -0.3030305], [-1.1666666, -0.41666675], [-1.0059524, -0.41666675], [-0.84523803, -0.41666675], [-0.68452376, -0.41666675], [-0.52380943, -0.41666675], [-0.36309516, -0.41666675], [-0.2023809, -0.41666675], [-0.041666627, -0.41666675], [0.11904776, -0.41666675], [0.2797619, -0.41666675], [0.4404763, -0.41666675], [0.60119045, -0.41666675], [0.76190484, -0.41666675], [0.922619, -0.41666675], [1.0833334, -0.41666675], [0.98333323, -0.29166675], [0.88333356, -0.16666675], [0.7833333, -0.041666746], [0.6833334, 0.083333254], [0.5833334, 0.20833325], [0.48333335, 0.33333325], [0.38333333, 0.45833325], [0.28333342, 0.58333325], [0.1833334, 0.70833325]]];
color := [0.8443222, 0.045043554, 0.90388143, 1.0];
Pos:=e.pos;
It is directly from the word document. I dont see the prob b/c im soo new to spawning these polygons.. and thx for all the help so far.. just a lil more till my project is over.. i was testing it with a triangle to see if i could get it right.
Density:=2
Scene.addPolygon {
surfaces := [[[0.08333337, 0.83333325], [-0.030303001, 0.71969676], [-0.14393938, 0.60606074], [-0.2575757, 0.49242425], [-0.37121212, 0.37878776], [-0.4848485, 0.26515126], [-0.5984848, 0.151515], [-0.7121211, 0.03787875], [-0.82575756, -0.07575774], [-0.9393939, -0.189394], [-1.0530303, -0.3030305], [-1.1666666, -0.41666675], [-1.0059524, -0.41666675], [-0.84523803, -0.41666675], [-0.68452376, -0.41666675], [-0.52380943, -0.41666675], [-0.36309516, -0.41666675], [-0.2023809, -0.41666675], [-0.041666627, -0.41666675], [0.11904776, -0.41666675], [0.2797619, -0.41666675], [0.4404763, -0.41666675], [0.60119045, -0.41666675], [0.76190484, -0.41666675], [0.922619, -0.41666675], [1.0833334, -0.41666675], [0.98333323, -0.29166675], [0.88333356, -0.16666675], [0.7833333, -0.041666746], [0.6833334, 0.083333254], [0.5833334, 0.20833325], [0.48333335, 0.33333325], [0.38333333, 0.45833325], [0.28333342, 0.58333325], [0.1833334, 0.70833325]]];
color := [0.8443222, 0.045043554, 0.90388143, 1.0];
Pos:=e.pos;
It is directly from the word document. I dont see the prob b/c im soo new to spawning these polygons.. and thx for all the help so far.. just a lil more till my project is over.. i was testing it with a triangle to see if i could get it right.
Density:=2
- ligglo
- Posts: 16
- Joined: Thu Feb 11, 2010 5:00 am
Re: How do I...?
It looks like you didn't copy the whole code.
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: How do I...?
You forgot to copy the } bracket at the end
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: How do I...?
jeesh. surfaces IS NOT the same thing as vecs, vecs are the ideal shape of the thing your making which you need to make a poly, surfaces is the garbled up shit that comes out which is generated automatically. While you can use existing surfaces info as vecs to spawn a poly its generally a bad idea because the thing that comes out the other end is yet another step further from what u originally wanted, srsly just try and visualize the shape then type in the vecs manually its not that hard.
- Mr_Stabby
- Posts: 155
- Joined: Wed Dec 16, 2009 12:16 am
16 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests