Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,280 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
elevator probelm #410093
10/27/12 21:45
10/27/12 21:45
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
hello, me again jaja , I have the next problem: I have one elevator on the level, the elevator moves well. however when the player character is in the elevator, and Elvador starts to go up, an unwanted effect of camera is produced

http://www.mediafire.com/?h50f2e3ps318ec8 link for download the program

the trace mode of the players ies: IGNORE_ME + IGNORE_SPRITES + IGNORE_MODELS + USE_BOX

the move of the player is:GLIDE | IGNORE_PASSABLE | IGNORE_PUSH | ACTIVATE_TRIGGER

the move of elevator is:my.z=my.z+1 *time_step;alt=alt+1

. what can i do to solution this problem?

thanks

Re: elevator probelm [Re: GaniX] #410096
10/27/12 23:17
10/27/12 23:17
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Describe your problem and provide screenshots, if possible. Only a small percentage of the users will download and test your program.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: elevator probelm [Re: Superku] #410224
10/30/12 17:13
10/30/12 17:13
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
ok, you're right in what you say.
if my English is bad and we can not properly understand I apologize, but I will try to make it clear.
the problem is the next:
the player can walk around the level without any problem.But when the player is on the elevator and Elvador is go up . The camera begins to flash. however when elevator is go down and the player stay on the elevator the camera does not do this.

I think it may be by the c trace . The move c. maybe the way of moving the Elvador. i dont know... any helps?
thanks

Re: elevator probelm [Re: GaniX] #410225
10/30/12 17:25
10/30/12 17:25
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Try to write
proc_mode = PROC_EARLY;
in your elevator loop.
If that does not help, check when the player is on the elevator (that means inside the elevator's bounding box, above it and vertically close to it) and change his z-position accordingly. Example:

my.z += direction*time_step;
if(player on elevator) player.z += direction*time_step;


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: elevator probelm [Re: Superku] #410232
10/30/12 18:51
10/30/12 18:51
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
ok i will do this and thanks

Re: elevator probelm [Re: GaniX] #410796
11/08/12 22:49
11/08/12 22:49
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
ok thats is what i did:
acction elevator
Code:
action ascensor()
{
my.emask =ENABLE_IMPACT;
proc_mode=PROC_EARLY;
var senal=0;
var senal_l=1;
	
//if(event_type == EVENT_IMPACT)if i use this way, the elevstor is not move
//if(you==player)
 senal=1;
var alt=0;
while(1){
	if (senal==1){
if (senal_l==1){  move_vec[2] += alt; my.z=alt *time_step;alt=alt+1;}						
				if (alt>=10)
						senal_l=0;
				if (senal_l==0){move_vec[2] += alt;my.z=alt *time_step;alt=alt-1;}
				if(alt<=-100)
						senal_l=1;											
						}
 	wait(1);


move_vec2 is the player.z
and the problem is continue
thanks

Last edited by GaniX; 11/08/12 23:50.
Re: elevator probelm [Re: GaniX] #410924
11/10/12 20:41
11/10/12 20:41
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Originally Posted By: Superku
check when the player is on the elevator (that means inside the elevator's bounding box, above it and vertically close to it)

You should/ could use the quoted approach to check when the player has to be moved. Your code is a little confusing to me to be honest, so I wrote you a basic example for an elevator that starts at the bottom and moves to a higher level when the player stands on it. It is untested but it should give you an idea of what I was talking about:

Code:
//skill1: target_z 0
action elevator()
{
	c_setminmax(my);
	set(my,POLYGON);
	if(!my.skill1) error("Elevator: Enter a target height in WED!");
	my.skill2 = my.z;
	my.skill3 = 1;
	while(!player) wait(1);
	while(1)
	{
		if(player.x > my.x+my.min_x && player.x < my.x+my.max_x
		&& player.y > my.y+my.min_y && player.y < my.y+my.max_y
		&& player.z+player.min_z > my.z+my.max_z && player.z+player.min_z < my.z+my.max_z+32) //you may have to adapt the 32 quants here
		{
			my.skill4 = maxv(my.skill4-time_step,0);
			if(!my.skill4) my.skill5 = 1; //activate elevator
		}
		else my.skill4 = 16; // one second delay
		
		if(my.skill5)
		{
			if(my.skill3 == 1)
			{
				my.skill6 = minv(my.skill1,my.z+10*time_step);
				c_move(me,nullvector,vector(0,0,my.skill6-my.z),IGNORE_MODELS | IGNORE_SPRITES | IGNORE_WORLD);
				if(my.skill6 >= my.skill1)
				{
					my.skill3 = -1;
					my.skill5 = 0;
					my.skill4 = 16;
				}
			}
			else
			{
				my.skill6 = maxv(my.skill2,my.z-10*time_step);
				c_move(me,nullvector,vector(0,0,my.skill6-my.z),IGNORE_MODELS | IGNORE_SPRITES | IGNORE_WORLD);
				if(my.skill6 <= my.skill2)
				{
					my.skill3 = 1;
					my.skill5 = 0;
					my.skill4 = 16;
				}
			}
		}
		wait(1);
	}	
}



Be aware that I don't manipulate my.z directly but use c_move because c_move updates the collision hull of the platform automatically (whereas without this instruction the hull could be updated after the player code).

Btw. try to use proc_mode = PROC_EARLY; here, too.

Last edited by Superku; 11/10/12 20:42.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: elevator probelm [Re: Superku] #411367
11/15/12 21:38
11/15/12 21:38
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
Hello, I read your code, I'll put it into practice.

I also do another code using c_scan:

Code:
player_move action () ....

if (mod == 1) move_vec [2] = (-c_trace (my.x vector (temp.x, temp.y, temp.z-1000), IGNORE_ME IGNORE_SPRITES + + + USE_BOX IGNORE_MODELS)) * 5 * time_step ;

move_vec  is the z player
 i use mod ==1 because  when the player is on the elevator i dont use the c trace to process the z player , i change the z player directly 

   / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
   elevator action ()
{
var signal;
   var senal_l = 1;
   var alt = 0;
while (1) {

if (vec_dist (player.x, my.x) <= 2000) {
c_scan (my.x, my.pan vector (360,0,54), IGNORE_ME);
if (you == player)
    sign = 1;}

  if (sign == 1) {
  mod = 2;
  if (senal_l == 1) {my.z &#8203;&#8203;= my.z &#8203;&#8203;+1 * time_step; alt = alt +1; move_vec [2] = alt;}
if (alt> = 10)
senal_l = 0;
if (senal_l == 0) {my.z &#8203;&#8203;= my.z&#8203;&#8203;-1 * time_step; alt = alt-1; move_vec [2] = alt;}
if (alt <= -10)
senal_l = 1;
}
  wait (1);
 
  }
}


this is only a test code
if you can help me to make an elevator but dont use skills i really thank you ,because is this what i want

Last edited by GaniX; 11/15/12 21:41.
Re: elevator probelm [Re: GaniX] #411374
11/15/12 22:36
11/15/12 22:36
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Why don't you want to use skills?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: elevator probelm [Re: Superku] #411583
11/17/12 19:35
11/17/12 19:35
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
because for my , for a moment is too confuse use skills, but I have to get used to using them.
by the way the problem of the camera and the elevator is in the code of the player as I can see ( i think is in the mode of c trace), i will studie dowload codes of players code
thanks laugh

Page 1 of 2 1 2

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1