![]() |
Learning
I am learning scripting and getting better with commands and I just today found out that a++ means that it adds one to a. Anyways, the one thing I cant figure out how to do is onwall. If someone could help I would greatly appreciate it. I dont wanna be a nuisance but I need u guys to help me along the way.
|
I'm not exactly an expert at onwall either, but I can throw in a few pointers. For example.
if (onwall,x,y){ putexplosion x,y; hurt 10000; lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60);sleep.05; lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60); lay2 goldrupee,random(1,60),random(1,60); destroy; } //End of script Try that and see if you dont get that picure, I give up, *yawn* dang, it's 1:00 A.M. in Texas. I had better get some sleep. night all.:asleep: :asleep: :asleep: -Rebel95 |
Onwall detects whether or not the x/y specified is on a wall... format:
if (onwall(x,y)){ } That should help... And I believe the a++ thing was detailed in the commands.doc... which makes me wonder if you've read it or not... |
Show off.....
:spam: :spam: :spam: :spam: -Rebel95 |
Quote:
-Rebel95 |
im just trying to learn how to make a weapon that only works when fired on a certain area
|
PHP Code:
|
i c
I think i c what youre saying....If youre between 2 points you want your weapon to work.
use this: if (weaponfired) { if (playerx in |<this is the number for as far left as its allowed>,<this is the number for far right>|) { if (playery in |<this is min height that is allowed>,<this is max height allowed>) {you action here; } } } Of course, you replace the <>'s with values (normally numbers ;)). Here is an example: if (weaponfired) { // You use the weapon to shoot an arrow in the players direction. if (playerx in |2,20|) { // The player is between the points of 2 and 20 on the x axis if (playery in |10,30|) { // The player is between the points of 10 and 30 on the y axis if (playerdarts>=1) {shootarrow playerdir; } } } } |
Or if there's a certain wall in front of the player. Or if the chicken crossed the road. :megaeek:
|
| All times are GMT +2. The time now is 08:35 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.