Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help how to alter a map by doing something in a different map
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#1
how to alter a map by doing something in a different map

so in my CS you go into this large house stuff happens you get teleported to different map and i want it so when i come back the map is different so still the same map but say the last quest in the other map set everything active in this map how would i do that?
(This post was last modified: 04-29-2012, 07:05 AM by zombiehacker595.)
04-29-2012, 06:53 AM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#2
RE: how to alter a map bu doing something in a diff map

No. There was not a single capital, and only one question mark at the end. I refuse to read your post until you've learned to type like an adult.

Noob scripting tutorial: From Noob to Pro

04-29-2012, 07:05 AM
Find
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#3
RE: how to alter a map bu doing something in a diff map

(04-29-2012, 07:05 AM)Cranky Old Man Wrote: No. There was not a single capital, and only one question mark at the end. I refuse to read your post until you've learned to type like an adult.


im 14

edit: and also are you joking this isnt english class
(This post was last modified: 04-29-2012, 07:06 AM by zombiehacker595.)
04-29-2012, 07:06 AM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#4
RE: how to alter a map bu doing something in a diff map

(04-29-2012, 07:06 AM)zombiehacker595 Wrote:
(04-29-2012, 07:05 AM)Cranky Old Man Wrote: No. There was not a single capital, and only one question mark at the end. I refuse to read your post until you've learned to type like an adult.


im 14

edit: and also are you joking this isnt english class
If you're 14, then do your parents know that you're playing an M rated game with subjects like torture?
No, I'm not joking. Typing like that is like talking like you're drunk. It's disrespectful. Somebody else will probably help you, though.


Noob scripting tutorial: From Noob to Pro

04-29-2012, 07:11 AM
Find
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#5
RE: how to alter a map bu doing something in a diff map

(04-29-2012, 07:11 AM)Cranky Old Man Wrote:
(04-29-2012, 07:06 AM)zombiehacker595 Wrote:
(04-29-2012, 07:05 AM)Cranky Old Man Wrote: No. There was not a single capital, and only one question mark at the end. I refuse to read your post until you've learned to type like an adult.


im 14

edit: and also are you joking this isnt english class
If you're 14, then do your parents know that you're playing an M rated game with subjects like torture?
No, I'm not joking. Typing like that is like talking like you're drunk. It's disrespectful. Somebody else will probably help you, though.


Whatever and yes they bought me it
04-29-2012, 07:12 AM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#6
RE: how to alter a map bu doing something in a diff map

(04-29-2012, 07:12 AM)zombiehacker595 Wrote: Whatever and yes they bought me it
Then they're bad parents who should care more about your upbringing.

Noob scripting tutorial: From Noob to Pro

04-29-2012, 07:23 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#7
RE: how to alter a map by doing something in a different map

Ha ha, don't worry about Cranky Old Man, he occasionally trolls Tongue (perhaps too many young in's won't get off his lawn?)

As for your problem, it sounds like you'll need to use a global variable (not something I'm very familiar with). If you are familiar with any type of variables, my limited understanding of globals leads me to believe that you can set them up just like normal (local) variables, except you can call them in other maps.

An alternate solution is you could make a copy of the map you want to change, then make the changes. Keep the door allowing the player to go back to that area locked until the player has triggered the event, then allow them to go back to the area that is now "changed" (which is the copy of the original map+changes).

The pro's of doing it this way is that you can alter static objects and not just entities.

Sorry if that didn't really make sense, but your original question lacked enough detail for me to give you much more than that.
(This post was last modified: 04-29-2012, 07:29 AM by Adny.)
04-29-2012, 07:29 AM
Find
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#8
RE: how to alter a map by doing something in a different map

(04-29-2012, 07:29 AM)andyrockin123 Wrote: Ha ha, don't worry about Cranky Old Man, he occasionally trolls Tongue (perhaps too many young in's won't get off his lawn?)

As for your problem, it sounds like you'll need to use a global variable (not something I'm very familiar with). If you are familiar with any type of variables, my limited understanding of globals leads me to believe that you can set them up just like normal (local) variables, except you can call them in other maps.

An alternate solution is you could make a copy of the map you want to change, then make the changes. Keep the door allowing the player to go back to that area locked until the player has triggered the event, then allow them to go back to the area that is now "changed" (which is the copy of the original map+changes).

The pro's of doing it this way is that you can alter static objects and not just entities.

Sorry if that didn't really make sense, but your original question lacked enough detail for me to give you much more than that.


haha thanks for the info fucking cranky man i dont think he has given me one usefull peice of information ever but thanks for the help Smile
04-29-2012, 07:31 AM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#9
RE: how to alter a map by doing something in a different map

Yeah, you can and probably should use global variables. You declare them usually in your first level's .hps file. You can create a bool global variable and set it to false (at declaration). Then, whenever your player does whatever they need to do to get the old map to change, set your global variable to true.

Once this is done, you go to your OnEnter() function and check to see if you are entering with the global variable being "true". You can do this with an if-statement. If it's true, then activate whatever needs activating.

Dark Seclusion Here
04-29-2012, 11:41 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#10
RE: how to alter a map by doing something in a different map

If I'm not mistaken the global variables are declared in a seperate .hps

04-29-2012, 01:42 PM
Find




Users browsing this thread: 3 Guest(s)