how to make a unr remember its state...

Discussions about Coding and Scripting
Post Reply
User avatar
FraGnBraG
Inhuman
Posts: 930
Joined: Sun Jun 13, 2010 5:13 pm
Personal rank: Good news everyone!
Location: Canada
Contact:

how to make a unr remember its state...

Post by FraGnBraG »

This is probably more of a single-player question than a ut one... what i'd like to do is have a map that "calls" other maps and remembers it's state.

for example, i have map1 (call it a hub). it has a portal that leads to other maps. so you would leave map1 to go and play map2. When you complete map2 you then return to map1. Map1 remembers you went to map2, so you can't go back there. You then go to map3, rinse repeat...

Anyone ever done this, or knows how to. I can imagine there could be some sort of read/write functions in script, thought i'd ask first ...

Any suggestions appreciated :)
-=FraGnBraG Level Design=- ***UPDATED! even works on your phone!***
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: how to make a unr remember its state...

Post by Feralidragon »

Well, yeah, there are a couple of ways to do that:
- either by a custom inventory or another actor that can "travel" between maps/servers;
- by setting up default values in some actor;
- by writing to a .ini file.

In case you want a regular SP with the normal saving features of oldskool and all, then it's better the 1st or the 2nd.
The 3rd is mostly to keep it recorded no matter if you save your progress or not (it's "permanent" until you delete the ini file or until something overrides or resets it).

I have never done it, and I am not sure if there's anything like that around. But it's doable, that's all I can say right now. :)
User avatar
FraGnBraG
Inhuman
Posts: 930
Joined: Sun Jun 13, 2010 5:13 pm
Personal rank: Good news everyone!
Location: Canada
Contact:

Re: how to make a unr remember its state...

Post by FraGnBraG »

thanks :tu:

i was hoping it wouldn't be a big deal ... in unreal it's just a chain of maps (i don't think there's any multi-used levels) deusEx (the original) had re-used levels tho - i think the Unatco HQ was a case where you returned - and the game "knew" where you'd come back from ... several other locales were like that. in a simple sense, i need some sort of static object the hub can read so things like movers and initialized correctly on each return trip... so i'll proceed as if it can be done :)
-=FraGnBraG Level Design=- ***UPDATED! even works on your phone!***
User avatar
zacman
Adept
Posts: 412
Joined: Wed Apr 15, 2009 5:36 am
Personal rank: M-M-M-MONSTER KILL

Re: how to make a unr remember its state...

Post by zacman »

Check out the Legacy single player pack by Ezekiel, it did this (very well too)

As for knowing where you came from, when doing a teleporter, instead of map#entry?peer just change it to map#TeleportTag?peer (Unlike MP, you don't respawn in SP, so PlayerStarts aren't as big a deal)
Image[url=steam://friends/add/76561198048595886]Image[/url]
User avatar
Dr.Flay
Godlike
Posts: 3348
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: how to make a unr remember its state...

Post by Dr.Flay »

Is it the rocket arena mod that uses those stacked mini-maps ?
There are a load of those 1-on-1, 4-in-1 maps. They must also deal with moving the player back and forth.
User avatar
FraGnBraG
Inhuman
Posts: 930
Joined: Sun Jun 13, 2010 5:13 pm
Personal rank: Good news everyone!
Location: Canada
Contact:

Re: how to make a unr remember its state...

Post by FraGnBraG »

wow, thanks guys :D I have that shaarj hub map without a purpose right now - I was hoping to have it use other maps (maplets, heh) for a small little campaign idea i have... I was going to add areas to the hub map, but i fear that would create another giant messy map full of bugs and i don't need any more of those, lol!

@flay - I will guess the RA is all script ... i will look at that with fingers crossed - i suck at uscripting :ironic2: seeing as i'm already a programmer :omfg:

@zacman - man, that's great. Ezkeel is going back for me (those were my first ue1 tuts :D)

I have a bunch of Ezkeel maps - the readmes say "Legacy" maps... nm - i know now you mean "Legacy SP mod" - I didn't have that one so I'm downloading it :)

Hope it's good, lol! thx
-=FraGnBraG Level Design=- ***UPDATED! even works on your phone!***
Post Reply