Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Some Random Dude

Slight Problem With Snapmap

Recommended Posts

Posted (edited)

So I'm working on a co-op survival map with a L4D style incap/death system, everything's working so far but I've run into a bit of a snag, I've got 2 variable integers, one to count the number of players incapped, and one to count the number of players dead, what I'm trying to do now is to simply add the 2 integers together

 

and I can't find a way to do it

 

idk if it's something I missed while going through the menus or if I flat out can't add them together at all but it's annoying me to no end since  I've had my map in the works for while now and I want to get it published before DE releases, can someone give me a definitive answer? if it's not possible that's alright, the map works perfectly fine without the incap half of it but I just want to be sure I'm not missing something blatantly obvious here.

 

EDIT: 64 views and no replies... I'll take it as a no then

Edited by Some Random Dude

Share this post


Link to post

BACK FROM THE DEAD TO ASSIST. (Probably too late by now, but...)

 

Add the intergers together? Very simple. I'll be using the PC version of Snapmap to demonstrate.

Adding intergers is pretty simple, once you fully know the controls for snapmap. When adding/subtracting/multiplying/whatever with numbers, you can change that number into a variable instead. Hell, it can even be a color code. You do so by selecting the adding command's properties, then options.

Example1.jpg.71daec1a9ddfbe8fa909471f30adb910.jpg

 

 

From there, it'll bring up more commands to pick. The one you want is Swap Variable/Constant.

 

Example2.jpg.861a16c50c06db742242cfbd55547f82.jpg

 

A window should come up of all the variables/constants that you have created in the map that you can select. (I chose variables Potatoes and Carrots, cause I'm a mean motherf@#$er) Whatever constant that variable has during the map play will be added, instead of a solid number count that's normally available. This should be the thing you're seeking.

 

Example3.jpg.88ba2b8c2eef55869d065e2877042ae4.jpg

 

 

Hope this helps in your troubles, if you still interested. Hell, I can help other people about Snapmap questionnaires, since I'm probably the go-to guy that knows Snaps in and out by this point.

Share this post


Link to post
On 1/29/2019 at 6:38 PM, Potatoguy said:

BACK FROM THE DEAD TO ASSIST. (Probably too late by now, but...)

 

Add the intergers together? Very simple. I'll be using the PC version of Snapmap to demonstrate.

Adding intergers is pretty simple, once you fully know the controls for snapmap. When adding/subtracting/multiplying/whatever with numbers, you can change that number into a variable instead. Hell, it can even be a color code. You do so by selecting the adding command's properties, then options.

Example1.jpg.71daec1a9ddfbe8fa909471f30adb910.jpg

 

 

From there, it'll bring up more commands to pick. The one you want is Swap Variable/Constant.

 

Example2.jpg.861a16c50c06db742242cfbd55547f82.jpg

 

A window should come up of all the variables/constants that you have created in the map that you can select. (I chose variables Potatoes and Carrots, cause I'm a mean motherf@#$er) Whatever constant that variable has during the map play will be added, instead of a solid number count that's normally available. This should be the thing you're seeking.

 

Example3.jpg.88ba2b8c2eef55869d065e2877042ae4.jpg

 

 

Hope this helps in your troubles, if you still interested. Hell, I can help other people about Snapmap questionnaires, since I'm probably the go-to guy that knows Snaps in and out by this point.

Thanks for the response, I think I've tried this before and it didn't work for some reason but I'll give it another go, I probably messed something up the first time.

Share this post


Link to post

Alright, I just booted up DOOM and opened up a test map to see if this works and it unfortunately doesn't work for what I'm trying to do with the way it's set up. I think I wasn't perfectly clear in my original post so to stay on the same page I'll use the same variable names.

 

20190205132128_1.jpg.0111322cc894cc71400a19a3a1a2d670.jpg

So to start off we have the 2 variables both are hooked up to buttons which will add or subtract their respective variable i.e. one button will add a potato and the other will subtract one. Both are connected to a third variable (shown below) via the system Potatoguy used.

 

20190205132151_1.jpg.2f2f0e76e0b74eadd07432bf0c8469d1.jpg

The final variable of Potatoes and Carrots is then hooked up to a message which will show what the final variable is when it has changed, now that's set up we get to actually testing the thing.

 

20190205132225_1.jpg.690714ce693deb0e02d2d7cb38a3f50c.jpg

So here we have our 4 buttons, 2 respective to potatoes and 2 respective to carrots, let's add a potato and see what happens.

 

20190205132234_1.jpg.1857455a1a3036d543ae3d5bb05e52ec.jpg

Everything seems to be in order, alright now let's add a carrot.

 

20190205132241_1.jpg.fbb228bc76b7d8da311497b71418f730.jpg

Looks like everything is working so far over here too, alright now let's subtract a Carrot, we should get a total of 1 on the message

 

20190205132252_1.jpg.e58979adad5452d304186d4b414d63fd.jpg

Odd, we didn't get a message at all meaning the final number hasn't changed meaning it's still at 2, either way let's add another potato again and see if that's still working properly, we should get a total of 3

 

20190205133432_1.jpg.cc00953fbcf9cbe81fb830b309598814.jpg

and here lies the problem, since we're only adding numbers in potatoguy's system we can't subtract at all and if we try to add up to more than 1 using the same variable, the system hasn't recognized that it needs to get rid of the first time we added that variable so if you add it again you will get more what you wanted, to illustrate I restarted the map and this time only hit the add potato button twice.

 

20190205132514_1.jpg.e52dad8c414764547d55d1635c846f70.jpg

First time it works fine, it only added 1 potato, now let's add the second one.

 

20190205133527_1.jpg.ab63788f3f765080b90cdf1fd753a8a4.jpg

This time we got 3 because the total was at 1 when we added the second potato, so when we add another it adds 2 to the total giving a total of 3 instead of the total we want which is 2. and if we were to add another potato the potato count would increase to three, but it would add 3 to the total, so instead of giving us 3 we instead would get 6, and the problem would persist until we hit our max cap for our integer. Unfortunately potatoguy's system doesn't work as it stands but as I was writing this reply I think I have a solution to the problem now, I'm going to hop back into snapmap and see if it works. 

Share this post


Link to post

HALLELUJAH! HOLY S@%#!

 

To fix the previous issue all I had to do was to put in one thing into the chain and connect everything else properly, I'll put together a video showing what I did and edit it into my original post in case anyone else has the same problem, but for now I'll do my best to explain it in pictures and text.

 

20190205144016_1.jpg.2e2ce0b83a0381b5018e64ce2356e4f2.jpg

First thing I did was put in a subtract command and set it to subtract the total from the total, essentially acting as a "clear all" for a calculator.

 

20190205144021_1.jpg.82fb2e5a69286841a98bdd536848dcfd.jpg

Next I set the other 2 add functions to have a 0.1 second delay, this is to prevent the subtract function from subtracting for the total after everything has been added so it doesn't wipe away everything we're trying to add, after that I of course made sure the on changed command from potatoes and carrots was hooked up to all the add and subtract commands, so now when either potatoes or carrots increase/decrease, the system will first get rid of current total, and then add up the new total. It's a little complicated but it works! Potatoguy I know the original system didn't work but it did help me think of one that would, so thanks for coming back from the dead to help!

Share this post


Link to post

Glad I can assist, even if you reverse engineered the solution yourself! :D

Oh, and for pointers to testing out variables, I'd advise you have the HUD option enabled that shows you 3 variables on the top left corner. Have it displayed, then assign variables of your choice onto it. You can visibly see variable more quickly that way, to test things quicker.

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×