![]() |
Vibration(ish)
I want to make a weapon so when you use it your screen shakes up and gives you mp but takes away heath.
i have the heath giving and mp getting things, and they work nicely but when i tryed to make the screen shake nothing eaven hapens :( im using "setfocus" then quickly changing it a bunch to give that effect. this is my script test: PHP Code:
|
funtion onWeaponFired(){
I believe you want: function onWeaponFired(){ :p |
Quote:
Anyway, I beleive you want: PHP Code:
PS: Congrats on learning GS2, You're getting there! |
Add a resetfocus(); at the end too...
The setFocus only works well when your screen ( or character ) isn't at the edge of the level already. |
Quote:
|
I used a timer and cos, so that it gave a vertical shaking. I'll see if I can get the formula.
Nevermind, it seems I'm having that 'you don't have admin rights' problem everyone else is. So ya... can't access the scripts I had online. Anyways it was something like: PHP Code:
|
I made something cool on versus, I'll wip it back up for you.
HTML Code:
//#CLIENTSIDE |
k i kept my mouth shut for a while, but what is a temp.i, and why do you add ++ to it?
|
Quote:
while temp.i is still less than 100, each time it loops, 1 will be added to temp.i, untill it hits 99 (since he didnt use <= ) so it will basically loop the "screen shake" 99 times. |
It's still 100 because it starts at 0.
|
| All times are GMT +2. The time now is 06:42 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.