heretic
Posts : 29 Join date : 2010-02-12
| Subject: Forcefields Thu Jul 15, 2010 8:52 pm | |
| I have an objective with 3 objective points. (Objective 0). Say i complete the objective. Then i make a room_reached entity and i put " if objective_complete(0)=1 then map_forcefield[x,y]=0 " It doesn't work.(no error msg, just the ff is still on). Any help? | |
|
vdweller Admin
Posts : 27 Join date : 2010-01-10
| Subject: Re: Forcefields Thu Jul 15, 2010 10:44 pm | |
| Use field_down(x,y) instead There are also 2 useful variables for shutting down a forcefield in the current room: roomx and roomy. They both store the x and y coords of the room you're currently in. So saying field_down(roomx,roomy) instead of numerically specifying coordinates also works. | |
|
heretic
Posts : 29 Join date : 2010-02-12
| Subject: Re: Forcefields Fri Jul 16, 2010 6:22 pm | |
| that was cool! thank you, Orangemonger... | |
|
heretic
Posts : 29 Join date : 2010-02-12
| Subject: Re: Forcefields Sun Jul 18, 2010 12:40 pm | |
| Well, i tested it and it seems like the typical ff issue... When you go to the room after you've completed the obj, you've got ff down. But, when you go without having completed the obj, then go away and then come back after you've compl the obj, you've got fail. what can i do? (Damn! I'm almost releasing the mappack...) | |
|
vdweller Admin
Posts : 27 Join date : 2010-01-10
| Subject: Re: Forcefields Sun Jul 18, 2010 1:22 pm | |
| - heretic wrote:
- Well, i tested it and it seems like the typical ff issue... When you go to the room after you've completed the obj, you've got ff down. But, when you go without having completed the obj, then go away and then come back after you've compl the obj, you've got fail. what can i do? (Damn! I'm almost releasing the mappack...)
I'm not so sure that's the case. I thoroughly tested it in 1.03 and other people who got stuck there told me that the problem disappeared. Opening level 8 of "A dormant Menace" in the editor will help. In there, I have 3 areas. Clearing them adds an objective point. When the player reaches the force field area, there's a "Room reached" object with the following settings: Property 1: if objective_complete(0)=true then field_down(roomx,roomy);Property 2 : 1You've probably missed property 2: It defines the persistence of the object. If not set to 1, the object dissapears after the first visit to the room, never to appear again. When set to 1, it always executes the code defined in property 1, no matter how many times you enter and exit. Tell me if it helps. Also, sending the world for any similar problems might help | |
|
heretic
Posts : 29 Join date : 2010-02-12
| |