[QUOTE=Flippy;190235]Hi,
…
Accums:
-
What is the maximum index you can use for a globalaccum? (eg, globalaccum [index])
I have read about 8, some say 9, some say it depends on the mod. The LDR says 10 but I’ve also read that is wrong because numbers 9 and 10 are used for other things already and may cause problems?
-
What is the maximum index you can use for a local accum
[/QUOTE]
In both 2.56 and 2.60 etmain There are 8 globalaccums and 10 accums allocated space. But errors in the code allow indexes of [0…9] in both cases. Consequently globalaccum 8 and globalaccum 9 will trash the neighboring variable (soldierChargeTime) and vice-versa. There are additional errors in some of the debug/diagnostic error messages related to accums that can further confuse but I won’t detail them here. Some major mods will have fixed the allocation bug but which and the version numbers will take some time to reverse-engineer/search.
I recommend you handle it by using the 0…9 range but adding a WARNING about not using globalaccums 8 and 9.
- What is the value range for (global)accums? Can they be negative? I am assuming they are half words (−32,768 to +32,767) or maybe signed integers (−2,147,483,648 to +2,147,483,647) but that’s just a guess.
They are allocated as signed 32bit integers and can be manipulated (set, inc…) as such (−2,147,483,648 to +2,147,483,647)
- What bit_indeces can we use for (global)accum [index] bitset [bit_index] (or bitreset, etc). Is it a single byte? 0 to 7? 1 to 8?
0…31 c-style (0 LSb…31 MSb/sign). If you understand binary representations of 32 bit 2’s complement you can mix bit and decimal operations. Example use bits 0, 1 and 2 as say completion bitflags(bitset)
then decimal test (trigger_if_equal 7) to see if all 3 are completed
- Regarding the sethqstatus [team] [status] command. What does the [status] parameter represent in this keyword? I believe it is the HQ (Command Post) bonus (like how fast your teams chargebar re-fills). What values can it take? 0.0 to 1.0, floats? Integers?
Status should be 0 (not built) or 1 (built). The chargebar bonus is handled not by sethqstatus but by the lines of setchargetimefactor normally put in the built event. “The sethqstatus script command will inform all team members about landmines being close by”. i.e. the “Mines have been reported in this area.” messages. I could not find any other code using the sethqstatus.
- Regarding the addtankammo [amount] command. Is this even functional? If so, what the hell is tank ammo?
Is it functional I don’t know. Google came up with so few hits it looks like nobody was using it. But there is code for it and for settankammo. (btw the code supports the format addtankammo <targetname> <amount> [<maxammo>] where the missing parameter maxammo (in square brackets) is optional)
I tried coding the commands by targeting the script_movers (All of them!) but saw no difference. In the code the <amount> is stored in effect1Time an entity variable that gets re-used a lot. In fact in the spawn code this variable seems to be used for communicating the health bar not ammo. btw there is a comment in mg42 code that says “// “Ammo” for this weapon is time based” so tank ammo may also be so? I wonder if EastFront has looked at this command?
-
Regarding the setmodelfrombrushmodel [targetname] [useoriginforpvs] [nonsolid] command. What does the useoriginforpvs parameter determine? I believe the PVS is the point that determines if the game draws the model or not when it is not in the players view (like the high tower in Goldrush, where a manual PVS is set so that it is always visible). How can I explain this properly and short for my Intellisense?
-
Regarding the enablespeaker [speakername] (or disablespeaker or togglespeaker) command(s), is the speakername parameter the targetname of the speaker entity, or a name used in the sounds file, or a speaker made in the ingame speaker editor?
Question 7 is really outside my experience and I don’t think a quick code search will answer your question.
Question 8 others have answered correctly, they all target the targetnames for the relevant entities however they were added. (The ingame speaker editor being my preference)
Events:
9. Regarding the failed event. Is it the same as the decayed event? The descriptions are nearly the same on Chrukers website (where I am getting all these commands from btw). Is the decayed event only for multi-stage constructibles, whereas the failed event is only for single-stage constructions maybe?
The failed event is similar to the decayed event that precedes it. The failed event happens after a decayed event (for any stage). The decayed final event can happen for single stage and multistage constructibles. The decayed stage1…stage3 events may only happen for multi-stage constructibles that have those mid-stage(s) defined. A failed event is triggered after each of these decayed events.
So why have a failed event? It seems to be possibly animation (SP?) related. decayed events occur while the decay sound plays and can start an an action sequence (animation?). The failed event is triggered after the sound is stopped and can not start an an action sequence.
- What does the message event do? Chrukers website lists the description as “Contains a sequence of VO in a message”. This does not mean anything to me however, and I don’t know when this event is raised/called/triggered, nor what it can be used for…
I am stumped on this one. “Contains a sequence of VO in a message”. is just the comment beside its entry in the structure that says it can start an action sequence. and yes the script parser accepts event blocks called message { }. I can not find any other useful reference to VO inside a message, or “sequence of”… Since it is an event I have searched the list of entity types reviewing their “message” keys. Even assuming that there is some way to put a VO inside a message key (which would be neat but I doubt you can), I don’t see why you would want to trigger an event script.