help sort method of the burboja

Get help using Construct 2

Post » Tue May 01, 2012 7:43 pm

Hello Scirra people, excuse me my English is not very good.

I would like to help me, I make the bubble sort method but not how to C2 or CC.
help me.


for(i=0; i < n-1; i++){                            
   for(j=0; j < n-1; j++){                   
        if(vec[j] > vec[j+1]){              
                      aux=vec[j];                  
                      vec[j]=vec[j+1];            
                        vec[j+1]=aux;}
              }
          }
B
9
S
3
G
5
Posts: 3
Reputation: 3,405

Post » Tue May 01, 2012 9:12 pm

Here is an implementation for C2:
http://www.scirra.com/forum/sorting-an-array_topic49771_post313341.html#313341

Also if you get the latest beta R87 you can just use the sort action for the array object.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Thu May 03, 2012 7:13 pm

thank you very much....
B
9
S
3
G
5
Posts: 3
Reputation: 3,405


Return to How do I....?

Who is online

Users browsing this forum: gamecorpstudio, InfiniteRockets, newt, sean080 and 21 guests