How do i fix this?

Discuss all aspects related to modding Zandronum here.
Post Reply
Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

How do i fix this?

#1

Post by Mr.Man » Sun Dec 01, 2013 6:00 pm

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);
}
Last edited by Mr.Man on Sun Dec 01, 2013 6:52 pm, edited 1 time in total.

Catastrophe
Retired Staff / Community Team Member
Posts: 2571
Joined: Sat Jun 02, 2012 2:44 am

RE: Is this possible in 1 script?

#2

Post by Catastrophe » Sun Dec 01, 2013 6:21 pm

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.

Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

RE: How do i fix this?

#3

Post by Mr.Man » Sun Dec 01, 2013 6:53 pm

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?
Last edited by Mr.Man on Sun Dec 01, 2013 6:58 pm, edited 1 time in total.

Catastrophe
Retired Staff / Community Team Member
Posts: 2571
Joined: Sat Jun 02, 2012 2:44 am

RE: How do i fix this?

#4

Post by Catastrophe » Sun Dec 01, 2013 6:58 pm

Take your teleport destination and move up higher.

Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

RE: How do i fix this?

#5

Post by Mr.Man » Sun Dec 01, 2013 7:27 pm

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 :#

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: How do i fix this?

#6

Post by Qent » Sun Dec 01, 2013 11:29 pm

Use a Teleport Destination With Z Height No Gravity (9044).

Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

RE: How do i fix this?

#7

Post by Mr.Man » Mon Dec 02, 2013 6:22 am

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?

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: How do i fix this?

#8

Post by Qent » Mon Dec 02, 2013 6:37 am

Yeah; when I did it I had to increase the Z height of the destination, too.

Klofkac
Forum Regular
Posts: 481
Joined: Sat Jun 09, 2012 1:31 pm
Location: Ask Grandvoid servers

RE: How do i fix this?

#9

Post by Klofkac » Mon Dec 02, 2013 10:18 am

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]
𝕂𝕝𝕠𝕗𝕜𝕒𝕔

Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

RE: How do i fix this?

#10

Post by Mr.Man » Wed Dec 04, 2013 4:23 pm

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!
Last edited by Mr.Man on Wed Dec 04, 2013 4:26 pm, edited 1 time in total.

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: How do i fix this?

#11

Post by Vincent(PDP) » Wed Dec 04, 2013 5:33 pm

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)
Last edited by Vincent(PDP) on Wed Dec 04, 2013 5:39 pm, edited 1 time in total.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

RE: How do i fix this?

#12

Post by Mr.Man » Wed Dec 04, 2013 5:58 pm

Oh damn i didnt even see it!

Ill check it out soon, after work

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: How do i fix this?

#13

Post by Vincent(PDP) » Wed Dec 04, 2013 11:02 pm

Mr.Man wrote: Oh damn i didnt even see it!

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

*lol*
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

RE: How do i fix this?

#14

Post by Mr.Man » Thu Dec 05, 2013 6:19 am

I only have time in like 8-9 hours :d
I didn't see the other one because you double posted lol

Post Reply