[SCRIPT] Area script. Help needed ! - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Area script. Help needed ! (/thread-13163.html) Pages:
1
2
|
Area script. Help needed ! - SpudroSpadre - 02-07-2012 Hi all ! So let's say I have a script area ( ScriptArea_1 for example ) on map "FirstFloor" and I want it to get activated when I pick up a key (Key_1) on map GuestRooms. So the ScriptArea_1 and the Key_1 are both on different maps. I have no slightest idea what I need to do to get it work. All help would be appreciated. Thx. RE: Area script. Help needed ! - SilentStriker - 02-07-2012 (02-07-2012, 09:12 PM)SpudroSpadre Wrote: Hi all !Here's a script Code: void OnStart() RE: Area script. Help needed ! - Khyrpa - 02-07-2012 tee global filu mappikansioon (global.hps). lisää sinne tällasta: void OnGameStart() { SetGlobalVarInt("ToActivateOrNotTo", 0); } sitte sillon ku se joku tapahtuu et saat sen script arean toimimaan ni laitat sinne: SetGlobalVarInt("ToActivateOrNotTo", 1); eli global filussa toi variaabeli muuttuu nollasta ykköseks. Sitte se mappi missä se area on: //// void OnEnter() { GetGlobalVarInt("ToActivateOrNotTo"); { if(GetGlobalVarInt("ToActivateOrNotTo") == 1) { //stuff you want done here } if(GetGlobalVarInt("ToActivateOrNotTo") == 0) { //nothing } } } edit. ninja'D RE: Area script. Help needed ! - SilentStriker - 02-07-2012 (02-07-2012, 09:27 PM)Khyrpa Wrote: tee global filu mappikansioon (global.hps). lisää sinne tällasta:Hi khyrpa ^^ RE: Area script. Help needed ! - SpudroSpadre - 02-07-2012 (02-07-2012, 09:22 PM)SilentStriker Wrote:Thx so much. Im gonna test it in a while.(02-07-2012, 09:12 PM)SpudroSpadre Wrote: Hi all !Here's a script RE: Area script. Help needed ! - Ninami - 02-08-2012 I haven't tried this my self but does that script really work even though they are on a different map? It just felt so easy, I thought it would be more complicated when you add more maps. RE: Area script. Help needed ! - Your Computer - 02-08-2012 (02-08-2012, 03:12 AM)Ninami Wrote: I haven't tried this my self but does that script really work even though they are on a different map? It just felt so easy, I thought it would be more complicated when you add more maps. Inventory items carry on to the next map, so it should work. RE: Area script. Help needed ! - Ninami - 02-08-2012 (02-08-2012, 03:40 AM)Your Computer Wrote:Yeah that's true. But that makes me wonder, how about buttons on one map that opens a door on a different map? Would that work?(02-08-2012, 03:12 AM)Ninami Wrote: I haven't tried this my self but does that script really work even though they are on a different map? It just felt so easy, I thought it would be more complicated when you add more maps. RE: Area script. Help needed ! - flamez3 - 02-08-2012 (02-08-2012, 04:44 AM)Ninami Wrote:You would need a global variable for that.(02-08-2012, 03:40 AM)Your Computer Wrote:Yeah that's true. But that makes me wonder, how about buttons on one map that opens a door on a different map? Would that work?(02-08-2012, 03:12 AM)Ninami Wrote: I haven't tried this my self but does that script really work even though they are on a different map? It just felt so easy, I thought it would be more complicated when you add more maps. RE: Area script. Help needed ! - Ninami - 02-08-2012 (02-08-2012, 06:03 AM)flamez3 Wrote:I guess that exists? So it's theoretically possible?(02-08-2012, 04:44 AM)Ninami Wrote:You would need a global variable for that.(02-08-2012, 03:40 AM)Your Computer Wrote:Yeah that's true. But that makes me wonder, how about buttons on one map that opens a door on a different map? Would that work?(02-08-2012, 03:12 AM)Ninami Wrote: I haven't tried this my self but does that script really work even though they are on a different map? It just felt so easy, I thought it would be more complicated when you add more maps. |