Author Topic: Damage at certain distances  (Read 5478 times)

0 Members and 1 Guest are viewing this topic.

Damage at certain distances
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.

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: Damage at certain distances
This is probably the WORST way to do it, but here:

Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Damage at certain distances
Repeat Count 360000? 100 is sufficient...
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: Damage at certain distances
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.
« Last Edit: October 24, 2006, 04:05:16 am by Black Wolf »
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Damage at certain distances
That's news to me. Do you have an example of it not working as expected?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: Damage at certain distances
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.
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Damage at certain distances
And writing 360000 makes the mission filesize higher :D
What's the max filesize limit for missions?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Damage at certain distances
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: Damage at certain distances
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:
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 
Re: Damage at certain distances
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.  :)

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Damage at certain distances
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.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Damage at certain distances
Why would you need variables? To get around the fact that every-time is per frame not per second?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Damage at certain distances
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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Damage at certain distances
Agreed. I figured that was what you meant :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Damage at certain distances
Quote from: Turey link=topic=42982.msg879478#msg879478
STOP BEING RIGHT! :hopping: :lol:
[/quote

Haha!!!!

Seriously,there's a max filesize,right? About 130kb...
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Damage at certain distances
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Hippo

  • Darth water-horse
  • 211
  • Grazing.
    • All Hands to War
Re: Damage at certain distances
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. *
VBB Survivor -- 387 Posts -- July 3 2001 - April 12 2002
VWBB Survivor -- 100 Posts -- July 10 2002 - July 10 2004

AHTW

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Damage at certain distances
The limit is more than 130kb in any case. I have a mission slightly over that and it works fine.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Damage at certain distances
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.

 

Offline Hippo

  • Darth water-horse
  • 211
  • Grazing.
    • All Hands to War
Re: Damage at certain distances
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 >_> )
VBB Survivor -- 387 Posts -- July 3 2001 - April 12 2002
VWBB Survivor -- 100 Posts -- July 10 2002 - July 10 2004

AHTW