| Post 1 | New | Posted August 31st, 2005 |
|---|---|
Patyk
| I have a problem with a taking cash from player (i give him extra life & he have to pay). I solved it that way: Code: 10 1 (204,28,4) PLAYER 0 0 20 (204,28,4) TRIGGER 1000 0 30 (199,40,4) BOMBSHOP 0 0 // bombshop to take cash 40 (199,40,4) TRIGGER 2000 1 // trigger to check if player drives a car and put car info into DUMMY 50 (194,40,4) POWERUP 15 0 // extra life 60 (194,40,4) DUMMY 0 0 // block to arrow (can't arrow on powerup?!) 70 (0,0,0) DUMMY 0 0 // dummy for current-driven car (it doesn't works) 80 (0,0,0) CARBOMB_TRIG 70 3000 // trigger to detect when the bomb is armed -1 0 DONOWT 0 0 0 0 0 1000 STARTUP 20 0 -1 0 0 1010 ADD_A_LIFE 0 -1 -1 -1 5000 2000 IS_PED_IN_CAR 10 0 -1 0 0 // check if player drives a car 2010 GET_CAR_INFO 10 -1 0 70 0 // put car info into DUMMY 3000 DISABLE 80 0 0 0 0 3010 SETBOMB 70 0 0 0 0 // disarm unnecessary bomb in car 3020 POWERUP_ON 50 0 0 0 0 // creates powerup 3030 ARROW 60 0 0 0 0 // arrow on it 3040 IS_POWERUP_DONE 50 0 3040 -1 0 // check if player takes the powerup 3050 ENABLE 80 0 0 0 0 3070 ARROW_OFF 0 -1 -1 0 0 -1 Anyway: is there other option to take the cash from player? bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla |
| Post 2 | New | Posted August 31st, 2005 | ||
|---|---|---|---|
| Cerbera Ben 'Cerbera' Millard
| This should really be in the Editing > General area. I take it you had to add the "bla bla bla" text to get around the anti-flames code which checks for capital letters? You take away the cash by placing a bombshop on the square? I don't think that is a good solution because it means the vehicle will have a bomb fitted when the player just wanted an extra life. Nice use of CARBOMB_TRIG to make sure the money is actually taken away, though. Neat code with good comments, too. There is no way to take money from the player directly. I think trying to do this should be avoided because it will never play well. ------------------
|
| Post 3 | New | Posted August 31st, 2005 |
|---|---|
Patyk
| Cerbera wrote: This should really be in the Editing > General area. Sorry, I'll put next topic in correct place. Quote: I take it you had to add the "bla bla bla" text to get around the anti-flames code which checks for capital letters? Yeah, that was the reason. Quote: I don't think that is a good solution because it means the vehicle will have a bomb fitted when the player just wanted an extra life. The bomb is disarmed by the code (line 3010). It works quite well at the first time, but I have a problem with second, and next times (some problem with DUMMY, in which i put current car, I think). Maybe you can help me? Quote: There is no way to take money from the player directly. Quote: I think trying to do this should be avoided because it will never play well. I agree, but I'm trying to make something similar to McDonald's - McDrive |
| Post 4 | New | Posted August 31st, 2005 | ||
|---|---|---|---|
| Cerbera Ben 'Cerbera' Millard
| I think it would be funnier if you let the player steal all the stuff without paying. This is GTA, not The Sims! A member of staff can move this thread to the correct area for you. ------------------
|
