Page 1 of 1

How do i fix this?

Posted: Sun Dec 01, 2013 6:00 pm
by Mr.Man
For a level i have a resist where you need to blow up a hole. The hole has 8 sectors because they all lower at a different speed to make it look collapsed. When its finished you need to jump in, and i use teleport_insector for that. however, i dont like how it takes 8 scripts for just that. Is it possible to make this 1 script?

Code: Select all

script 5 (void){ //sector 1
teleportinsector(24,33,34,0,0);
}
script 6 (void){ //sector 2
teleportinsector(25,33,34,0,0);
}
script 7 (void){ //sector 3
teleportinsector(26,33,34,0,0);
}
script 8 (void){ //sector 4
teleportinsector(27,33,34,0,0);
}
script 9 (void){ //sector 5
teleportinsector(28,33,34,0,0);
}
script 10 (void){ //sector 6
teleportinsector(29,33,34,0,0);
}
script 11 (void){ //sector 7
teleportinsector(30,33,34,0,0);
}
script 12 (void){ //sector 8
teleportinsector(31,33,34,0,0);
}

RE: Is this possible in 1 script?

Posted: Sun Dec 01, 2013 6:21 pm
by Catastrophe
Put in an argument.

So.

Code: Select all

script 1 (int tag)
{
        teleportinsector(tag,33,34,0,0);
}
Then in doombuilder, Image

Set argument 1 to the sector tag you want it to go to.

RE: How do i fix this?

Posted: Sun Dec 01, 2013 6:53 pm
by Mr.Man
it works but i have a new problem. When i teleport it teleports me directly on the ground. I want to spawn in the air.
how do fix this?

RE: How do i fix this?

Posted: Sun Dec 01, 2013 6:58 pm
by Catastrophe
Take your teleport destination and move up higher.

RE: How do i fix this?

Posted: Sun Dec 01, 2013 7:27 pm
by Mr.Man
Catastrophe wrote: Take your teleport destination and move up higher.
I triet but it doesnt fix it.
Hold on for 5 minutes, ill make it exactly the same height.

------

http://static.[bad site]/wads/ze29alphav0.2.wad

This is the level. I placed a visual camera at the spot. To the right of it is the destination. I tried all teleport destinations.

by the way, it seemed like i could use an action for teleportinsector. No scripts were needed at all...
My bad :#

RE: How do i fix this?

Posted: Sun Dec 01, 2013 11:29 pm
by Qent
Use a Teleport Destination With Z Height No Gravity (9044).

RE: How do i fix this?

Posted: Mon Dec 02, 2013 6:22 am
by Mr.Man
I tried with all of the destinations. I tried leveling everything, but with no result.
Unless I really missed something, could someone try it in my level?

RE: How do i fix this?

Posted: Mon Dec 02, 2013 6:37 am
by Qent
Yeah; when I did it I had to increase the Z height of the destination, too.

RE: How do i fix this?

Posted: Mon Dec 02, 2013 10:18 am
by Klofkac
I was doing this before in much different way.
I was using the SetActorPosition instead of Teleport all the time when I needed to do special effects. The main idea is, moving the players by certain coordinates if they meet conditions. It is best done when the source and destination sectors are in same angle and shape.
Advantage of this is that when player jumps, it teleports them midair while keeping the velocity, making the teleportation almost seamless (the teleport lag will still bw there, though).
I actually did this in stiff's ZE19 for tram effect back in 2011.[/size]

RE: How do i fix this?

Posted: Wed Dec 04, 2013 4:23 pm
by Mr.Man
Guys i might be able to fix this with something, but i have no idea how to make it.
i was thinking of a fake floor, to catch the player and teleport them. Could somebody explain how to?

(i dont want to make a portal, because those bug alot and cause lagg)

EDIT: i forgot to mention that all the suggestions worked, but due to the jump-over and phisics, you did not see people fall. My bad for that!

RE: How do i fix this?

Posted: Wed Dec 04, 2013 5:33 pm
by Vincent(PDP)
Mr.Man you asked me this on a Private Message, I have already sent you a fix for your map. It works 100% :P
As Klofkac said: SetActorPosition.
Example:
SetActorPosition(PLAYER_TID+PlayerNumber(), GetActorX(PLAYER_TID+PlayerNumber())+1024.0, GetActorY(PLAYER_TID+PlayerNumber())+64.0, GetActorZ(PLAYER_TID+PlayerNumber())-128.0, 0)

This would move the player 1024 map units right, 64 map units forward and 128 map units down (In Z height)

RE: How do i fix this?

Posted: Wed Dec 04, 2013 5:58 pm
by Mr.Man
Oh damn i didnt even see it!

Ill check it out soon, after work

RE: How do i fix this?

Posted: Wed Dec 04, 2013 11:02 pm
by Vincent(PDP)
Mr.Man wrote: Oh damn i didnt even see it!

Ill check it out soon, after work
You ignored me D:!

*lol*

RE: How do i fix this?

Posted: Thu Dec 05, 2013 6:19 am
by Mr.Man
I only have time in like 8-9 hours :d
I didn't see the other one because you double posted lol