barrier

Non-platform specific questions.

barrier

Postby ESL » Thu Aug 12, 2010 2:55 am

I get the idea that you can use a wire frame actor to create a barrier. Are there any more specific examples?

I want to make a wall that blocks the actor from passing until an action occurs that destroys the wall.
ESL
 
Posts: 96
Joined: Mon Jun 28, 2010 2:05 am
Score: 1 Give a positive score

Re: barrier

Postby Bee-Ant » Thu Aug 12, 2010 3:16 am

Why don't you just make the player collide with the wall itself?
If the wall and the background are the same actor, you can use this code :

Wall -> CreateActor
Code: Select all
if(animindex==getAnimindex("Wall"))barrier=1;

Player -> Collision -> Wall
Code: Select all
if(collide.barrier==1)PhysicalResponse();
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: barrier

Postby ESL » Thu Aug 12, 2010 5:14 am

I tried it but there were too many code errors.

I made"wall" the actor>collision with man> script editor> added your scripts
ESL
 
Posts: 96
Joined: Mon Jun 28, 2010 2:05 am
Score: 1 Give a positive score

Re: barrier

Postby Bee-Ant » Thu Aug 12, 2010 8:17 am

Did you just copy-paste it?
In that case, you have to make "barrier" variable first (actor variable).
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: barrier

Postby ESL » Fri Aug 13, 2010 5:16 am

I want to have the wall as a separate character. How do I create a barrier variable?

Thanks!
ESL
 
Posts: 96
Joined: Mon Jun 28, 2010 2:05 am
Score: 1 Give a positive score

Re: barrier

Postby Bee-Ant » Fri Aug 13, 2010 1:33 pm

Go to any Script Editor and do this :
Image
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: barrier

Postby ESL » Sat Aug 14, 2010 3:56 am

Thanks so much. Now the problem is that the focus goes back to it's original position so that the letters overlap each other.
ESL
 
Posts: 96
Joined: Mon Jun 28, 2010 2:05 am
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron