[QUESTION][REQUEST]View shake code

The forum for discussions that don't fall into any of release topics below.

Moderator: Forum Guards

[QUESTION][REQUEST]View shake code

Postby Tonnochi » Thu Jan 17, 08 8:01 pm

Could someone tell me the code to make the view shake (like it does when you destroy a tri-hull weld point on the ship in SP) and could someone give me a bind code for it for the "F" key please.
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby ~SaSQuAtCH~ » Thu Jan 17, 08 9:06 pm

RTKM_Volcano has that effect, I suggest you to try to find its creator and ask him to tell you the code if there's no other way.
User avatar
~SaSQuAtCH~
Master
 
Posts: 1777
Joined: Mon Feb 26, 07 8:29 pm

Postby Allan » Thu Jan 17, 08 9:38 pm

You could look at the mission script for either that boat mission, or mission 15.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Tonnochi » Thu Jan 17, 08 9:41 pm

Come on, this is a request for it, not how to do it.

Couldn't find it there anyway.
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Cozmo » Thu Jan 17, 08 10:44 pm

I think they were just EarthquakeTriggers in volcano. :?
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Kaiden » Fri Jan 18, 08 8:14 pm

Stop just thinking cause it has Request tag people are gonna drop what they're doing and do it - People make suggestions and you try and do it yourself. :roll:
------
Kaiden
Alpha
 
Posts: 7003
Joined: Wed Jan 18, 06 11:21 pm
Location: England

Postby Tonnochi » Fri Jan 18, 08 8:47 pm

¤[ß2S]¤Cozmo wrote:I think they were just EarthquakeTriggers in volcano. :?


Is it actually possible to summon triggers?
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Cozmo » Fri Jan 18, 08 9:05 pm

[FGS]Zeitgeist wrote:
¤[ß2S]¤Cozmo wrote:I think they were just EarthquakeTriggers in volcano. :?


Is it actually possible to summon triggers?


Never tried, but they're still classes so it should work.

Edit: Summon ShakeTrigger

But it'll only shake for one second, so after that.

admin set shaketrigger shaketime #.000000

Or I could just code something for you. :?

Code: Select all
player.ShakeView(shakeTime, shakeRollMagnitude, shakeVertMagnitude);
Last edited by Cozmo on Fri Jan 18, 08 9:14 pm, edited 2 times in total.
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Tonnochi » Fri Jan 18, 08 9:22 pm

I found out how, so I will summon a lot in a row.

Still need the bind coding for "F".
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Cozmo » Sat Jan 19, 08 12:19 am

Ok, with the bind this is closest you can get, mutator:

Code: Select all
//============================
// MutatorShake - Cozmo
//============================
Class MutatorShake extends Mutator config(Mutator);

var() float shakeTime;
var() float shakeRollMagnitude;
var() float shakeVertMagnitude;

simulated function PostBeginPlay()
{
   Level.Game.BaseMutator.AddMutator(Self);
}

function Mutate (String S, PlayerPawn Player)
{
   if(mid(S, 0, 5) ~= "shake")
   {
      player.ShakeView(shakeTime, shakeRollMagnitude, shakeVertMagnitude);
   }

   if(mid(S, 0, 9) ~= "shakemore")
   {
      shakeTime+=1;
   }

   if(mid(S, 0, 9) ~= "shakeless")
   {
      shakeTime-=1;
   }
}

defaultproperties
{
}
Not tested*

And in user.ini

F=mutate shake

And there's mutate shakemore and shakeless to alter shaketime. :)
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Tonnochi » Sat Jan 19, 08 3:11 am

Thank you, but I don't know where the hell to put that code.
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Kaiden » Sat Jan 19, 08 3:30 am

http://tack.planetdeusex.gamespy.com/Ho ... kages.html :wink:

Save that Code above as .uc in Notepad.
Last edited by Kaiden on Sat Jan 19, 08 3:31 am, edited 1 time in total.
------
Kaiden
Alpha
 
Posts: 7003
Joined: Wed Jan 18, 06 11:21 pm
Location: England

Postby Tonnochi » Sat Jan 19, 08 5:23 am

doesn't work. Assigned as exactly mutate shake and it doesn't work :(
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Kaiden » Sat Jan 19, 08 4:02 pm

Here is it compiled, I'm guessing you add EditPackages=Shake, and maybe ServerPackages=Shake, then try in game (After putting file in system folder)
Attachments
Shake.u
Shake.u
(1.74 KiB) Downloaded 9047 times
------
Kaiden
Alpha
 
Posts: 7003
Joined: Wed Jan 18, 06 11:21 pm
Location: England

Postby Alex » Sat Jan 19, 08 4:18 pm

Question, do you want this to work on your server only, or on all?
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Tonnochi » Sat Jan 19, 08 5:09 pm

Singleplayer.
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Batchy » Sat Jan 19, 08 5:15 pm

EditPackages=Shake
Mr.Fagstix wrote:This is why I fucking hate you. Because somehow you manage to take somebodies posts, twist them against them, troll them and flame bait them and then you still get away with it? Is this forums management on fucking crack or some shit? Fucking SERIOUSLY.
User avatar
Batchy
Addict
 
Posts: 508
Joined: Fri Sep 21, 07 5:40 am

Postby Tonnochi » Sat Jan 19, 08 5:23 pm

I did that.
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Kaiden » Sat Jan 19, 08 5:31 pm

Wouldn't it be like Mutategame.mutate shake or something? Like MM is.
------
Kaiden
Alpha
 
Posts: 7003
Joined: Wed Jan 18, 06 11:21 pm
Location: England

Postby ~SaSQuAtCH~ » Sat Jan 19, 08 7:55 pm

¤[ß2S]¤Cozmo wrote:I think they were just EarthquakeTriggers in volcano. :?


Who cares if the same thing happens? :)
User avatar
~SaSQuAtCH~
Master
 
Posts: 1777
Joined: Mon Feb 26, 07 8:29 pm

Postby Cozmo » Sat Jan 19, 08 11:23 pm

Oh I think I know; I didn't declare the shaketime variable in defaultproperties, so it's 0, ie: Not shaking :|
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Tonnochi » Sun Jan 20, 08 5:43 pm

That may have an effect.
User avatar
Tonnochi
Forum Hero
 
Posts: 2719
Joined: Mon May 28, 07 11:43 pm

Postby Cozmo » Sun Jan 20, 08 10:18 pm

Ok, updated. Add this to your ini as well as server packages.

ServerActors=ShakeMutator.MutatorShake

I don't know how mutators work in singleplayer, if at all, so if not, I'll code something else.
Last edited by Cozmo on Sun Jan 20, 08 10:18 pm, edited 1 time in total.
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Darma » Fri Aug 27, 10 6:48 pm

Sorry for reviving but to make a mutator works in singleplayer, you need to summon the class (ShakeMutator.MutatorShake) in the map or add it in the editor because ServerActors is used to summon them in multiplayer
Darma
Badass
 
Posts: 157
Joined: Tue Dec 29, 09 5:45 pm
Location: est l'action qui consiste à louer tout bien à une personne (Bail)

Postby ~DJ~ » Fri Aug 27, 10 7:16 pm

Alot of people know that already now.. :3

BUT YEAH THANKS
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby Darma » Fri Aug 27, 10 11:35 pm

Yeah but because they were asking (*cough 2 years ago) I replyed (*cough* late)
Darma
Badass
 
Posts: 157
Joined: Tue Dec 29, 09 5:45 pm
Location: est l'action qui consiste à louer tout bien à une personne (Bail)


Return to Comments, questions, requests

Who is online

Users browsing this forum: No registered users and 1 guest
cron