Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Can you use an int in ParseArg?
Can you use an int in ParseArg?
2002-03-28, 11:36 AM #1
So, if I set up an int and use it on the runspeed (for example), will it work right? Yes, I know this is easy to test, but I'm a little short on time, and I'm sure you all know anyway. Thanks for the help!

------------------
Christianity: Don't knock it if you haven't tried it.

Why should the devil have all the good music? www.thousandfootkrutch.com
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-03-28, 11:40 AM #2
Hideki once suggested using JKstrings for parsearg, but Ive not heard of any success wiht that.


Parsearg() is used with strings. The value is contained inside of that string, so variables, IE ints, dont work.



------------------
Success is the inverse relationship between effort, gain, and loss.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-03-29, 4:40 AM #3
Yeah, I'm pretty sure you're going to have to use a long set of relational tests with different parseargs to get what you're after. ^^^ Like he said, variables don't work with parsarg.

Plus it doesn't sync worth a crap (if at all?) through multiplayer.
2002-03-29, 5:18 AM #4
Quote:
<font face="Verdana, Arial" size="2">Plus it doesn't sync worth a crap (if at all?) through multiplayer</font>


sendtrigger()
2002-03-30, 3:14 AM #5
Hold on. If I use ParseArg to change my run speed, why would it need to sync? Doesn't my speed just increase and then my position is sent out like normal? Or perhaps I missed something.

Beyond that, is there any way to have a slightly randomized run speed generated without using if's or a for loop (which I always screw up anyway)?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-03-30, 4:47 AM #6
You would have to use an if statement and a Rand() statement, but it would be relatively simple.

Code:
temp=Rand()*10
if (temp==1){
ParseArg(player, "whatever");
}
else if(temp==2){
ParseArg(player, "whatever");
}

etc.


Rather odd that you would want to use ParseArg to change ones speed...

------------------
His pot is blacker than his kettle!
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2002-03-30, 10:11 AM #7
temp will be a flex number so you need to use <= instead of ==. [http://forums.massassi.net/html/tongue.gif]

------------------
Author of the Jedi Knight DataMaster.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!