![]() |
Hitobjects
I'm currently trying to script a laser beam, in the style of Shoop Da Whoop.
However, hitobjects only hits the player directly in front of me, rather than along the line of reference (the showpoly). I've tried fiddling with the range and the number of times it calls hitobjects() (9.5/8), to no avail. PHP Code:
|
PLEASE don't use hitobjects -- remnant from GS1 for compatibility.
I would do something like this: PHP Code:
EDIT: As an alternative to triggering the server, you could just send a triggeraction at their location. Would probably be better idea, you'd have to tinker with it. For npcs, do the same thing and just do like temp.BOOMSHAKALAKA[0].trigger( "PWNED", player.account ); or something. |
I was working from the basis that I have bare minimum NC access on UN. I'd do something like that. Infact, in any other way, I'd use triggeraction but tbh, I haven't got the access to said "System" NPCs. I doubt Malinko would ever give me such privileges.
|
Quote:
|
Quote:
PHP Code:
|
Yeah, I've always wanted a triggeraction2() function that has an array of cords rather then an x and a y. This array would be the "points" on the shape-area that you want to trigger.
|
Quote:
Also, does anyone have any idea on how I'd make this laser beam do some damage on a long range whilst containing it in one script? |
Quote:
For organization's sake when I script something like this that requires triggerclients I use the system scripts. It can be done all in one NPC (i.e hitobjects() as you suggested above) but as far as I can tell it's just not as practical. |
Lol @ above posts, anyways.. You could make it a shoot() tho, and make the gani that will be fired using particles, and then set lifetime to some high value and "continueafterdestroy" to true (So it will fade the effect out when hitting a player/wall instead of just disappearing). Then ask someone to put your "onActionProjectile()" code somewhere so other players can be triggered through that shoot() projectile..
just a thought tho |
It's not a continuous beam though? It's a set length beam :/ It's quite short aswell. 9.5 tiles in length.
|
If you know how to directly edit HP, you could do that, instead of a hurt function.
|
Quote:
I ended up using triggeraction anyway. |
| All times are GMT +2. The time now is 02:49 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.