View previous topic :: View next topic |
Author |
Message |
[B@D]Thug
Joined: 07 Oct 2005 Posts: 315
|
Posted: Sun Mar 08, 2009 8:02 pm Post subject: I need help with a shield belt. |
|
|
I am making a aquatic shield belt. Much like the ScubaGear. I cant seem to get the AquaBelt to breath underwater. But i got the bubbles, the activation sounds and whatnot to work. Can anybody finish off the function for me? I can't seem to figure out how to make him breath in the water. _________________ Improvements along the way friends and foes.
WebSite:www.freewebs.com/agressivetoys |
|
Back to top |
|
|
Bleeder91
Joined: 28 Sep 2006 Posts: 265
|
Posted: Sun Mar 08, 2009 11:04 pm Post subject: |
|
|
you know that when youre drowning, you lose health every 3 seconds or so. well, that's got to do with the float paintime in playerpawn script. so what the SCUBAGear actually does (in the timer() in state activated) is keep resetting the paintimer to 1 second every 0.1 seconds, as long as the player is in the water.
there are 2 things to finish youre question, if im correct:
1. just copy whole the timer function of the scubagear.
2. Make the protectiontype1 (or 2) of you're belt "Drowned".
that'll prolly fix it. _________________ Unreallity - Wrath of the Skaarj is still developing! Check out the new refreshing website!
|
|
Back to top |
|
|
[B@D]Thug
Joined: 07 Oct 2005 Posts: 315
|
Posted: Mon Mar 09, 2009 12:09 am Post subject: |
|
|
I some how figured out a way to do it other than that. But it has limitations, and it is a little bit degrading. What i did was change both the charges to a decreasing zero, and an increasing zero. Like shown here...
}
Charge -= 0;
if (Charge<+0) {
Pawn(Owner).ClientMessage(ExpireMessage);
UsedUp();
}
The trick is, it cant rise nor fall. NOW, the disadvantage of it is that if a monster or player shoots you... you have to swim up to get your air. Because it is a shield belt and once you are shot, the shield belts charge variable decreases. However i am in a personal debate whether i should just fix it how you have it or if i should leave it be. What do you think would have greater value to choose? _________________ Improvements along the way friends and foes.
WebSite:www.freewebs.com/agressivetoys |
|
Back to top |
|
|
[B@D]Thug
Joined: 07 Oct 2005 Posts: 315
|
Posted: Mon Mar 09, 2009 12:14 am Post subject: |
|
|
Alright, now... i need to make the player swim faster. Do you know what i can do for that? _________________ Improvements along the way friends and foes.
WebSite:www.freewebs.com/agressivetoys |
|
Back to top |
|
|
Bleeder91
Joined: 28 Sep 2006 Posts: 265
|
Posted: Mon Mar 09, 2009 9:16 am Post subject: |
|
|
Code: |
state activated
{
function endstate()
{
Pawn(Owner).SwimSpeed = Pawn(Owner).Default.SwimSpeed;
}
begin:
Pawn(Owner).SwimSpeed = Pawn(Owner).Default.SwimSpeed*5;
}
|
if youre wondering how i come to that, look in the default properties of the class 'Pawn', section Movement. and now you mention it, there's a third option:
Pawn(Owner).UnderWaterTime = 99999;
so that will be like:
Code: |
state activated
{
function endstate()
{
Pawn(Owner).SwimSpeed = Pawn(Owner).Default.SwimSpeed;
Pawn(Owner).UnderWaterTime = Pawn(Owner).Default.UnderWaterTime;
}
begin:
Pawn(Owner).SwimSpeed = Pawn(Owner).Default.SwimSpeed*5;
Pawn(Owner).UnderWaterTime = 99999;
}
|
_________________ Unreallity - Wrath of the Skaarj is still developing! Check out the new refreshing website!
|
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Mon Mar 09, 2009 4:04 pm Post subject: |
|
|
lol isn''t it "waterspeed"? insteat of swimspeed? _________________
|
|
Back to top |
|
|
Bleeder91
Joined: 28 Sep 2006 Posts: 265
|
|
Back to top |
|
|
[B@D]Thug
Joined: 07 Oct 2005 Posts: 315
|
Posted: Tue Mar 10, 2009 10:27 pm Post subject: |
|
|
lol, i had to figure out how to call the activation. For a long time i was still confuzed as shit. _________________ Improvements along the way friends and foes.
WebSite:www.freewebs.com/agressivetoys |
|
Back to top |
|
|
|