[CP] ZPack - Bugfix Release! (p1)

Projects that have specifically been abandoned or considered "dead" get moved here, so people will quit bumping them. If your project has wound up here and it should not be, contact a moderator to have it moved back to the land of the living.
Nuke em
Posts: 132
Joined: Thu Nov 16, 2006 6:51 pm
Location: Working in my sercret laboratory.

Post by Nuke em »

Nash wrote:Just a friendly note... I don't really see the point in you editing the combination out of your code by replacing them with ?'s when the code is clearly visible in your screenshot... =P
Oops... :oops:

Yeah, the multiplicative property of zero. Anything multiplied by zero becomes zero. Thus, it would (as you said) be the same as declaring them zero.
Nuke em
Posts: 132
Joined: Thu Nov 16, 2006 6:51 pm
Location: Working in my sercret laboratory.

Post by Nuke em »

CRAP. :(

This is almost working, but now the hudmessages won't work right. Every time you hit a switch the hudmessage that the variable is assigned to doesn't show up, can someone read over this and locate my mistake?
Spoiler:
Ten friggin' scripts for this sucka', I need solar's help. :wink:
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

Well, my figuring for this would be that, as you're using ACS_Execute from within the script, the world is the thing considered activatingthe SwitchMes* scripts. Try making the HudMessage parts of the SwitchMes* scripts HudMessageBold instead... or failing that, make it all one script. I can assure you from personal experience that scripts can be a lot bigger than that and still work just fine.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

17, 18, and 19 use while loops. Since nothing inside the loop modifies the condition, the scripts are probably self-terminating with runaway script errors. Change those to IF. You're using Restart to keep them looping anyway. You don't need both.

You'll probably have to adjust the HUDmessage parameters as well. I don't recall what they all mean, but the values look to be too high for your restart delay and you're probably overwriting the message before it gets fully displayed.

What's the point of DEFINE-ing script names if you're just going to put ACS_Execute(17, ...) anyway?

Also, I hope you're not expecting multiplayer compatability.

And with only 25 possible values, the whole puzzle will be pretty easy to hack.
Nuke em
Posts: 132
Joined: Thu Nov 16, 2006 6:51 pm
Location: Working in my sercret laboratory.

Post by Nuke em »

Actually in multiplayer, it would be easier to sovle the puzzle because the switches can all change at once. I could see complications if each player was in a different part of the map, but if the players have good commuinication it wouldn't matter. I'm sure there is a way for the messages to display for all players. I'll research the wiki a bit.

The script is working now, but I can't get the messages to leave the screen after the player(s) have solved it and pressed onward. I was DEFINE-ing them for it to be easily understood, but I guess I forgot about putting the names in the Execute and Terminate commands. :?

How would it be easy to hack?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Nuke em wrote:I'm sure there is a way for the messages to display for all players.
[wiki]HudMessageBold[/wiki]
The script is working now, but I can't get the messages to leave the screen after the player(s) have solved it and pressed onward.
Make sure there's a non-0 delay in the hud message, or give it a unique ID and print a blank string with the same ID to manually clear it.
How would it be easy to hack?
With only 25 possibilities, they could just try every one until it works.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Of course, I should have mentioned this before: Even better than swapping 'while' for 'if' in this situation would be to just print the variable in the HUDmessage and take out the conditional structures completely. They are not at all necessary.

And yes, it wouldn't take much time to just input all of them. So little time, in fact, that it probably will be quicker to solve the map that way unless all the codes are located very close by.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Oi e vey, I just opened that spoiler block and saw the script.

Remember the golden rule: Redundant code == BAD

Try this on for size:
Spoiler:
User avatar
Kirby
Posts: 2697
Joined: Thu Aug 26, 2004 1:23 pm

Post by Kirby »

Ahh, the wonderful world of arrays :trippy:
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

I've been a little delayed by these last exams, but tomorrow is my last exams for the rest of this school year, so I'll be good to finish up my map either tomorrow afternoon or Thursday. Got together a couple of screenies demonstrating the texture issue I mentioned earlier, but I'll show them when I join the offsite forum, as I shall my map.
Nuke em
Posts: 132
Joined: Thu Nov 16, 2006 6:51 pm
Location: Working in my sercret laboratory.

Post by Nuke em »

Thanks HotWax. :D

As you can obviously see, I'm not a very good scripter. :( I really appreciate the help you've just given me. I see how what you made works, but I would be hard pressed to do something like that by myself. So, like I said, I really thank you for the help. Now, let me take your brain and transfer your knowledge of ACS to me! :twisted:

Oddly, when I wrote that post to risen, I'd already used HudMessageBold for the very reason of multiplayer display. But thanks anyways.

I'll read into your script more and improve my skillz even more. :)

EDIT:: 25 possibilities is enough to annoy people without pissing them off so much that they cheat, or skip the level. It's a switch combo puzzle anyway, so it wouldn't matter if they tried all the combos (they're supposed to).

EDIT 2:: The HudMessages didn't change position for each switch, and if you hit a switch before the other hudmessage is complete it starts writing over it.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Nuke em wrote:EDIT 2:: The HudMessages didn't change position for each switch, and if you hit a switch before the other hudmessage is complete it starts writing over it.
The first argument of the revised script is the switch number the player is hitting. On the switch line, make sure arg3 is equal to the switch number (0 = A, 1 = B, 2 = C), or they'll all act like switch 0 (A).

Basically, instead of calling ACS_Execute(11, 0, 0, 0, 0) you need them to call ACS_Execute(11, 0, X, 0, 0), where X is the switch number.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

On another note, I'm sure you could condense "Switches" and "SwitchColors" into a single 2-dimensional array. :P
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

TheDarkArchon wrote:On another note, I'm sure you could condense "Switches" and "SwitchColors" into a single 2-dimensional array. :P
I don't see how that'd make any sense, TBH.
The only reason I'd do that is if each switch (A, B, C) had to have multiple colors assigned to it. Then you could have A-Blue, A-Green, A-Yellow, B-Blue, B-Green, ...
Nuke em
Posts: 132
Joined: Thu Nov 16, 2006 6:51 pm
Location: Working in my sercret laboratory.

Post by Nuke em »

Ok, I'm over the hill, thanks to HotWax. But now, every time the ResetSwitches function activates, it messes up the hudmessages. The values reset, but the hudmessages don't. Thus, the wrong information is displayed on screen until you hit that switch again. I'm still working on it, but I though I'd inform you so that you can quickly fix the problem if you can.

I thought that maybe you could place:

Code: Select all

HudMessage(s:"Switch ", s:SwitchNames[number], s:" now set to ", i:Switches[number]; Hudmsg_Plain | HUDMSG_LOG, number+1, SwitchColors[number], 0.5, 0.02*number, 6, 0.5, 10.0); 
After a ResetSwitches and a Delay(1);, but because you have to place int number inside the parameters of the HitSwitch script it won't work.


Here's the further modified script:
Spoiler:
Locked

Return to “Abandoned/Dead Projects”