Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: JediMasterTim on October 23, 2006, 08:37:45 pm
-
I am new to FRED and I'm trying to make a multiplayer mission. Is it possible to have a specific player start to take damage (or self destruct immediately if that can't be done) if it goes a certain distance from an object? I've struggled with it and can't figure it out. Any help would be appreciated.
-
This is probably the WORST way to do it, but here:
(http://img.photobucket.com/albums/v86/Turey/event.png)
-
Repeat Count 360000? 100 is sufficient...
-
Repeat counts are meaningless, so why not max it out? Better safe than sorry.
Turey: There's nothing wrong with that events tree. It's the simplest way to do it, and the simplest is often the best.
That said, someone has apparently borked either the < or > sexp (one works, one doesn't and I can never remember which), so if one fails, switch the arguments about and switch over to the other.
-
That's news to me. Do you have an example of it not working as expected?
-
Repeat counts are meaningless, so why not max it out? Better safe than sorry.
He's right though, you'd only need a repeat count of 100. After that, you're dead.
-
And writing 360000 makes the mission filesize higher :D
What's the max filesize limit for missions?
-
High enough that the number of repeats is unlikely to be a consideration :p
He's right though, you'd only need a repeat count of 100. After that, you're dead.
And what happens if later on you decide to allow support ships to repair the hull in your campaign? Far better to have a ridiculously high repeat count and not need it than find that the mission is breaking because you forgot to consider that you might make changes in the future.
-
He's right though, you'd only need a repeat count of 100. After that, you're dead.
And what happens if later on you decide to allow support ships to repair the hull in your campaign? Far better to have a ridiculously high repeat count and not need it than find that the mission is breaking because you forgot to consider that you might make changes in the future.
STOP BEING RIGHT! :hopping: :lol:
-
Thanks, this is exactly what I needed. As for the repeat count, this is going to be a multiplayer mission with multiple respawns so I'll need more than 100. Unless of course the counter resets every time. I don't know, I'm just a newbie. :)
-
You can actually make an event have an infinite repeat count using the every-time conditionals and variables, although it's easier to just set it really high.
-
Why would you need variables? To get around the fact that every-time is per frame not per second?
-
Yeah, exactly. If you only used one event, your strength would appear to go down to 0 almost instantly. You can get around that by making the main event set a variable along with a second event that resets the variable back with a one second (or whatever) delay. Although this is too messy and complicated for what is being done here anyway. :p
-
Agreed. I figured that was what you meant :)
-
Haha!!!!
Seriously,there's a max filesize,right? About 130kb...
-
If you're reducing your repeat count in order to avoid hitting the filesize limit (assuming there even is one in the first place) then you're a bloody idiot.
-
If you're reducing your repeat count in order to avoid hitting the filesize limit (assuming there even is one in the first place) then you're a bloody idiot.
:nod:
Seeing as a single byte can hold a signed integer far larger than 36000... ((2^31)-1) to be technical. Information on ships in space uses a ****ton more space than a single repeat count.
*Hippo remembers the U. R. A. Moron easteregg. *
-
The limit is more than 130kb in any case. I have a mission slightly over that and it works fine.
-
Seeing as a single byte can hold a signed integer far larger than 36000... ((2^31)-1) to be technical.
A single byte only holds 256 possible values. You might be thinking of a four-byte word.
-
Seeing as a single byte can hold a signed integer far larger than 36000... ((2^31)-1) to be technical.
A single byte only holds 256 possible values. You might be thinking of a four-byte word.
Actually i was thinking a double which is 4 bytes, my mistake... (or am i wrong there too? i didnt read that chapter >_> )
-
Depends on the system architecture. :p IIRC most doubles use 8.
-
/me gives up
-
And never mind that the mission files are stored in ASCII, not binary. So 360,000 is in fact three bytes longer than 100 :P
Though Kara's right, if you're squeezing a mission file for 3 bytes you're an idiot.
-
Seeing as a single byte can hold a signed integer far larger than 36000... ((2^31)-1) to be technical.
A single byte only holds 256 possible values. You might be thinking of a four-byte word.
Actually i was thinking a double which is 4 bytes, my mistake... (or am i wrong there too? i didnt read that chapter >_> )
I believe you are thinking of a Long (which goes from 0 to (2^32)-1).
-
And never mind that the mission files are stored in ASCII, not binary. So 360,000 is in fact three bytes longer than 100 :P
Though Kara's right, if you're squeezing a mission file for 3 bytes you're an idiot.
Especially considering that removing one word from a briefing, debriefing or message would have a much bigger effect most of the time :)