View Single Post
  #2  
Old 07-17-2011, 01:32 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You could do something like...

PHP Code:
if (this.char_x in |this.wall_xthis.wall_x this.wall_width| &&
    
this.char_y in |this.wall_ythis.wall_y this.wall_height|) {

    
// In Wall


You'd benefit more from searching 'polygon collision' and seeing how it's implemented in other programming/scripting languages and then port/adapt it to GS2.
__________________
Quote:
Reply With Quote