Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help how to alter a map by doing something in a different map
Author Message
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #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 all posts by this user Quote this message in a reply
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #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 all posts by this user Quote this message in a reply
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #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 all posts by this user Quote this message in a reply
Adny Offline
Posting Freak

Posts: 1,786
Joined: Mar 2012
Reputation: 173
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
FragdaddyXXL Offline
Member

Posts: 136
Joined: Apr 2012
Reputation: 7
Post: #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 all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 42
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)