Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
::chin resting in palm:: i've encountered an issue. Figure this; i have a KeyDown Event which consists of the following;
conditional1: if true do----------------------->action 1 else do conditional 2
conditional2: if true do----------------------->action 2 else do conditional 3
conditional3: if true do----------------------->action 3 else do conditional 4
conditional4: if true do----------------------->action 4 else do conditional 5
As you may have wisely deduced the first 2 execute without fail. In attempt to get it to work i've positioned the actions in various logical positions;
(*)conditional one in the main sequence all the rest on the right
The question; What pattern/order/configuration do i need to get this to work?
------------------
(url="http://"http://www.geocities.com/ellrx/index.html")eLL' softWare: "eLL'_e_vated" :Last updated 11.30.02(/url)
(url="http://"http://ellrx.web1000.com/index.html")eLL' webDesign Portfolio(/url)
(url="http://"http://www.geocities.com/ellrx/download/index.html")5 coldStone specific PDFs(/url)
(This message has been edited by ellrx (edited 12-05-2002).)
Time out... One more thing I know that this can be done using the X button and NPCs this is not more intention...i need an interaction scheme .
also the mouse is out...i despise the mouse .
Instead of "else do conditional 2" etc., leave it at nothing. I find that that works. That is, place all of your conditionals in the left-hand side and all the actions in the right-hand side.
This means that all of the conditionals will be called. If you don't want that to happen, then "stack" events, which I've done quite a lot because you can get quite a lot of variables that way. But I do believe that the problem lies with "else do conditional 2" and placing it in the right-hand side.
So you'll have five events:
In Event 1:
left-side conditional 1 right side action 1 and call event 2
In Event 2:
left-side conditional 2 right side action 2 and call event 3
etc.
The engine will go through the array until it hits the conditional that's true. Then it executes and stops.
Yes, I know that it seems that it should work the other way, but I think that the engine gets confused. I don't think that this is a workaround, but simply the way it works.
------------------ -- Debra Danillitphil Productions
//snip//
(/b)<HR></BLOCKQUOTE>
Before i read your response i started brewing up something far more amusing than a case switch, it involved; an NPC the proximity parameter and a player position this idea ultimately died...thwarted by a pesky fail safe that won't allow you to throw the player into immediate conflict...which could effectively hang your game...this safety function will place your player one tile distance away, no matter what. ------------ Tried your first method;
()it only executed the first parameter I had already tampered wih something similar to what you wrote... ()anyhow tried yours... ()result the same no go ()reminded why i asked my question ------------ solved the problem myself...its so far away from where i started its disturbing ------------ Thanks for the aide... ------------------
(This message has been edited by ellrx (edited 12-06-2002).)
It occurred to me after I wrote the response above, and in bed of course, that sometimes when I make a conditional event array, the problem is with how I work with globals. The event array that I described above works well for me and is stable. For instance, I want the engine to see if the Player possesses a particular set of items and the first one it hits an action happens and then everything stops, which is what I want.
Globals seem to be tricker. It still works, but you have to be careful that you place the changeglobals at the top of the event, amongst other things. I do have conditional event arrays with globals, but discovered that I had to treek how I work with the globals, while the rest of it was fine.
By the way, if you have an encounter with a passive NPC and it's talking to you, then you can replace that NPC with an aggressive NPC at &&Player;_x and &&Player;_y and BAM, the Player's in trouble because when the Player closes the dialogue window the NPC is right on him. You can't do that with an initial aggressive NPC because there's no Player Contact event link available.
Unless you mean you found a way to place the NPC literally within the same tile, then you have not placed the NPC at PlayerXPlayerY. ------------------ Again, i've tried about 7 different architectures of multiple conditionals and all of them either; execute the first 2 cases (do conditional 2) execute the first one in all cases ignoring the others (else do nothing) do nothing at all(called events) ...Not going to pursue it. ------------------ Believe me what i came up with is far simpler than attempting to get CGE to
behave like a normal coding environment
simulate flow controls
perform lengthy logic
Usually the most virtual solution works the best. ------------------ "You can't do that with an initial aggressive NPC because there's no Player Contact event link available." Explain this...if the NPC is set to 'try to reach the player', then there is a 'player contact' event link available.
In the NPC Control, you can place an NPC at &&Player;_X and &&Player;_Y. It is as I described.
The event array that I described also works -- for me. I don't know what you're doing differently.
I'm glad it worked out for you, though.