| Blockland Forums > Modification Help |
| Can't change the player's datablock all right and proper. |
| (1/5) > >> |
| Giovan:
Here's my file. This weapon, as it stands now, is basically just a Horse Ray that is set to change the player's datablock to the No-Jet player datablock. Here's the strange part. When I hit a horse with it, it changes into a player. But if a player is hit with it, it changes him into... I think it's just a normal player. He can jet, certainly. He can also be hit with a normal horse ray, and changed back again with this. Can someone take a look at my code and tell me if I did something wrong? Thanks. PS: Yes, I know it doesn't check for the no-jet player to be enabled, but I checked, and when I was testing it, nojet WAS enabled. |
| Human Reaper:
You need to parent and package it if your using damage. |
| otto-san:
--- Quote from: Human Reaper on March 24, 2011, 03:06:52 PM ---You need to parent and package it if your using damage. --- End quote --- No. From Weapon_Package_Rays that has the exact same thing in it. --- Code: ---function NoJetRayProjectile::Damage(%this,%col,%obj) { if(%obj.getType() & $Typemasks::PlayerObjectType) { %obj.changeDatablock(PlayerNoJet); } } --- End code --- PROBLEM: You used setDatablock. |
| Human Reaper:
Really, ok well thats a little stange, I guess but whatever. Also he parented the one before it so he would need to package that to, or is there another wierd expeption. |
| otto-san:
...Are you under the impression that doing something like function BEAR::CROSS() automatically warrants a parent/package thing? It doesn't. Packaging and parenting is only for functions that already exist that you are making modifications to. edit: he packaged the one before it because of some odd weapon things. i dont know how to explain it |
| Navigation |
| Message Index |
| Next page |