SwishTalk.com
 

Go Back   SwishTalk.com > .:: THE HELP DESK ::. > » SWiSH Max4 General Help

Reply
 
Thread Tools Display Modes
#1   Line two points  

Name: 
piciaxel
Status: Offline
Rank: SWiSHer
Posts: 7
Old 04-21-2012, 03:10 PM Reply With Quote


how to draw a line beetwen two points using line to...
only problem is that: points are in moving bouth and i need to have that line all time




               
 
View Public Profile Send a private message to piciaxel Find all posts by piciaxel Add piciaxel to Your Contacts
#2    

Name: 
OutCast**NL
Status: Offline
Rank: SWiSHer
Posts: 647
Old 04-21-2012, 05:04 PM Reply With Quote


See attached example



Attached Files
File Type: swi DrawLinebetweenObjects.swi (6.3 KB, 26 views)
               
 
View Public Profile Send a private message to OutCast**NL Visit OutCast**NL's homepage! Find all posts by OutCast**NL Add OutCast**NL to Your Contacts
#3    

Name: 
piciaxel
Status: Offline
Rank: SWiSHer
Posts: 7
Old 04-24-2012, 11:00 AM Reply With Quote


finaly i've figured out that won't work as this but now i have anorther problem.....
i don't know how to ban areas for ball to not enter in them

32 is number of my trial

2 mistakes: script is on scene not on the shape and speed is 150 fps




Attached Files
File Type: swi 32.swi (18.6 KB, 13 views)
               

Last edited by piciaxel; 04-24-2012 at 11:36 AM.. Reason: 2 wo mistakes
 
View Public Profile Send a private message to piciaxel Find all posts by piciaxel Add piciaxel to Your Contacts
#4    
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,497
Mood: MEAN: Do's not play well
Old 04-25-2012, 04:03 AM Reply With Quote


All you scripting is on your objects not the scene. Your major mistake is using _parent you need to get rid of that and go to _root.
If you want the speed set at 150 fps click on Movie Properties tap and set it.
What do you mean by ban? Do you mean hit test to stop them or to hit test to move around the obstacles?

Here is an example of something of what you want to do.

Wayne


Attached Files
File Type: swi ping.swi (13.2 KB, 18 views)
               
__________________
The Hairy One
Wayne helps those that helps themselves.

Last edited by cycle1500; 04-25-2012 at 07:02 AM..
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#5    

Name: 
piciaxel
Status: Offline
Rank: SWiSHer
Posts: 7
Old 04-25-2012, 08:28 AM Reply With Quote


Quote:
Originally Posted by cycle1500 View Post
All you scripting is on your objects not the scene. Your major mistake is using _parent you need to get rid of that and go to _root.
but when i put it in a bigger project were i use containers and loaded stuff can create really problems so i usualy use _parent

Quote:
Originally Posted by cycle1500 View Post
If you want the speed set at 150 fps click on Movie Properties tap and set it.
that was update because I saw them later

Quote:
Originally Posted by cycle1500 View Post
What do you mean by ban? Do you mean hit test to stop them or to hit test to move around the obstacles?
only to not cross the lines.... as in the phisics games when you have a ball that you can move.... if you want it's like this: http://www.webgame14.com/Roll.game2555.html


               

Last edited by piciaxel; 04-25-2012 at 09:11 AM..
 
View Public Profile Send a private message to piciaxel Find all posts by piciaxel Add piciaxel to Your Contacts
#6    

Name: 
piciaxel
Status: Offline
Rank: SWiSHer
Posts: 7
Old 05-01-2012, 01:59 PM Reply With Quote


so what i do wrong there?
or what i forgot to do?

why my rounded rectangle make corners (sorry for my broken english )


Attached Files
File Type: swi 32.swi (24.1 KB, 14 views)
               
 
View Public Profile Send a private message to piciaxel Find all posts by piciaxel Add piciaxel to Your Contacts
#7    
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,497
Mood: MEAN: Do's not play well
Old 05-02-2012, 04:15 AM Reply With Quote


Quote:
why my rounded rectangle make corners (sorry for my broken english )
Your corners are from the bounding box. If you look at your movie as it sets there you click on your rounded rectangle you will see a square out line this is what is formed around an object and called a bounding box. So when your B2 does a hit test it looks for the bounding box or border.
Hope that leads you to a better understanding.

Wayne


               
__________________
The Hairy One
Wayne helps those that helps themselves.
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#8    

Name: 
piciaxel
Status: Offline
Rank: SWiSHer
Posts: 7
Old 05-02-2012, 05:31 AM Reply With Quote


so, what's the solution?


               
 
View Public Profile Send a private message to piciaxel Find all posts by piciaxel Add piciaxel to Your Contacts
#9    
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,497
Mood: MEAN: Do's not play well
Old 05-02-2012, 08:58 AM Reply With Quote


A search here is some done awhile back.

Below is a example I made up to show that you can with scripting do an exact contact point match.

Wayne


Attached Files
File Type: swi exact_contact.swi (20.5 KB, 16 views)
               
__________________
The Hairy One
Wayne helps those that helps themselves.

Last edited by cycle1500; 05-02-2012 at 10:10 AM.. Reason: file
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#10    

Name: 
piciaxel
Status: Offline
Rank: SWiSHer
Posts: 7
Old 05-03-2012, 01:28 PM Reply With Quote


i,ve figured out a way to do it but i have a problem with an not working script....

well this isn't the best way but for an begginer as me i hope isn't bad

Quote:
onSelfEvent (load) {

for (i=10; i<=98; i++) {
n=i-9
nume="m"+i
radius=100
tellTarget (nume) {
_width=Math.sindeg(n)*radius
_height=Math.cosdeg(n)*radius
_x=-200
_y=200
}
}
}

also i have the test souce.....


Attached Files
File Type: swi circle test.swi (103.4 KB, 15 views)
               
 
View Public Profile Send a private message to piciaxel Find all posts by piciaxel Add piciaxel to Your Contacts
Advertisement:





Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump