Fire cape
June 24th, 2010, 20:08
Screen shaking
Description: Adding a screen shaking frame.
Assumed Knowledge: Copy & paste.
Tested Server: Emulous 1.7
Files/Classes modified: PlayerAssistant.
Difficulty: Easy.
Firstly,
Find your PlayerAssistant class.
This can ususaly be found by folowing this path.
server > model > players.
Add this into your PlayerAssistant class.
public void screenShake(int a, int b, int c1, int e) {
if(c.getOutStream() != null && c != null) {
c.getOutStream().createFrame(35);
c.flushOutStream();
c.getOutStream().writeByte(a);
c.getOutStream().writeByte(b);
c.getOutStream().writeByte(c1);
c.getOutStream().writeByte(e);
}
}
Useage:
Gentle shake:
screenShake(0, 0, 10, 10);
Violent shake:
screenShake(0, 10, 10, 10);
Description: Adding a screen shaking frame.
Assumed Knowledge: Copy & paste.
Tested Server: Emulous 1.7
Files/Classes modified: PlayerAssistant.
Difficulty: Easy.
Firstly,
Find your PlayerAssistant class.
This can ususaly be found by folowing this path.
server > model > players.
Add this into your PlayerAssistant class.
public void screenShake(int a, int b, int c1, int e) {
if(c.getOutStream() != null && c != null) {
c.getOutStream().createFrame(35);
c.flushOutStream();
c.getOutStream().writeByte(a);
c.getOutStream().writeByte(b);
c.getOutStream().writeByte(c1);
c.getOutStream().writeByte(e);
}
}
Useage:
Gentle shake:
screenShake(0, 0, 10, 10);
Violent shake:
screenShake(0, 10, 10, 10);