• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Something to make you think (Coding Difficulties)

Status
Not open for further replies.

SACooper95

Pokémon Ranger
Contributor
So, something I'm working on is figuring out how to set up a warp block in a special way.

This is Hypothetical, but let's say I want to set up a warp block in "Pokemon City". In the daytime the warp will link you to "Day Time Route". However, at Night it will link you to "Night Time Route". Both Routes look the same, so I can keep the offset data on the "Day Time Route". The problem would be, can I set up a script block to do this properly, or would it be a warp block?
 

Darkfire

Administrator
Administrator
P3D Developer
you can use a script block
you will need to tell it to be visible
and the script will need to be version=2 syntax
 

SACooper95

Pokémon Ranger
Contributor
All right I did what I needed to, I've set it up as a script block and it's visible. However, I keep getting a >0 Length error. what am I doing wrong? I'm using cities already in the game to test this out on. Here's the code:
Code:
version=2
:if:daytime(1)
:then
@Unregister:(route29.dat)
@Register:(barktown.dat|2|position|0,0.1,14,0)
:endif
 
:if:daytime(3)
:then
@Unregister:(barktown.dat)
@Register:(route29.dat|1|position|0,0.1,11,0)
:endif
 
:end
 

Darkfire

Administrator
Administrator
P3D Developer
those aren't warp scripts for the player
those are npc registers
what you would do is
also that is not how ifs work in version=2
Code:
version=2
:if:<environment.daytimeid>=1 <or> <environment.daytimeid>=2
:then
@player.warp(map1.dat,0,0.1,0)
:else
@player.warp(map2.dat,0,0.1,0)
:endif
:end
 
Status
Not open for further replies.
Top