How to test the view range-??

Non-platform specific questions.

How to test the view range-??

Postby Just4Fun » Mon Apr 19, 2004 11:29 pm

I'm still muddling around with the screen coordinate math for GE. Here is what I would like to do:

Reduce the screen boundry for my actor when using a random actor placement script. The script takes place in a different activation region from the original view:

I use the following script to change from the initial view area to the new activation region:
view.x= -360;
view.y= -160;
=====================
My actor needs more restricted boundries than the rand statement below offers me. Say, 40 pixels in from the left, right,top and bottom of the activated view region.

This is the script that I am working with:
x=rand(view.width)+view.x

---------------
I've spent several hours trying to tinker with adding and subtracting from the view.width and view.x. I've also gone back over the "range" example that jazz-e-bob posted a while back . I've tried different variables and "if" statements. I'm not getting anywhere.
To prevent a disasterous head banging incident, I'm posting here. Anyone care to venture an educated (or uneducated) guess?

TIA :?
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby makslane » Tue Apr 20, 2004 1:27 pm

Try this:

x = (rand(40) - 20) + your_x_center;

This will make the actor around your x center with the range:

your_x_center - 20 to your_x_center + 20
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ingsan » Tue Apr 20, 2004 2:39 pm

:) Please excuse me. I'm having great difficulty understanding what you mean by this :
Reduce the screen boundry for my actor when using a random actor placement script. The script takes place in a different activation region from the original view


Could you spend some time (for me :cry: ) to explain what you want to do ? :mrgreen:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby ingsan » Tue Apr 20, 2004 2:45 pm

Morover, remember my question about ActivationRegion ? About the linking it to view. Well it's the first time I'm using this feature but I find no way how to Link the region to view and what I understood from your post is that you are actually capable of modifying ActiavtionRegion.
I was womdering HOW :|

:cry: :cry: :cry: tout ne va pas bien ...
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby Just4Fun » Tue Apr 20, 2004 5:08 pm

Ingsan,
I am so sorry. Now, I do not understand.

What do you want to do :?:
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby ingsan » Tue Apr 20, 2004 5:12 pm

tout va bien
Everything is ok

:mrgreen:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby ingsan » Tue Apr 20, 2004 5:15 pm

What i just wanted to know is some more informations about the way ActivationRegion worked. How to use it step-by-step.
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby Just4Fun » Tue Apr 20, 2004 5:15 pm

Makslane,

You are amazing! Thank You. :lol:
Você é surpreendente! Obrigado.

(Courtesy Babel Fish Translation)
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby makslane » Wed Apr 21, 2004 4:18 pm

:D
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby makslane » Wed Apr 21, 2004 4:23 pm

ingsan wrote:about ActivationRegion ? About the linking it to view


There is no links between activation regions and the view.
Look checkers demo

Is a region around the "Loading" actor and other around the game.

On the Loading actor's "Create Actor" event just move the view to right place
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ingsan » Wed Apr 21, 2004 9:22 pm

Você é surpreendente! Obrigado.


Si Si Si Si :wink:

Makslane Thanks. I'm gonna do what you said !
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest